Most of the time they are interchangeable.
Only that talking about real umcomfortable events (in a conversation or writing about it) people are slightly more suscetible to use "bad dream", as in:
The bills are coming, I got a flat tire, then this blackout happens, when will the bad dream end?
(when the bad news is to end?)
But, then, someone someone that was kidnapped for some days would say that he thought that the nightmare wouldn´t end as well. (nightmare here would be more urgent and dramatic than "bad dream".)