Well, how I would use this word is purely a matter of opinion, but I tend to use it on things that make me want to not do anything and stay inside. "What dreary weather!" would mean "This weather isn't at all suitable for leaving the house," or perhaps more accurately "This weather makes me feel like staying inside and not doing anything."
Sure enough, M-W (I typed the above paragraph without looking up the word) describes dreary as "causing unhappiness." I suppose that I equate that feeling of unhappiness closer to lethargy than actual sadness.
Dreary can be used in a formal setting. It's not slang, and is commonly found in literature.