• 꿈을 꾸다, to have a dream can be abbreviated to 꿈꾸다, to dream.
• However, 안 좋은, not good/bad being an adjective can only modify a noun.
So, it cannot be used with the verb 꿈꾸다, i.e.
안 좋은 꿈꾸다 = to dream bad (❌)
안 좋은 can however be used to modify the noun dream (꿈) of the phrasal verb to have a dream (꿈을 꾸다). So
안 좋은 + 꿈 = a bad dream
"안 좋은 꿈"을 꾸다 = to have "a bad dream" (✔)
My guess is
안 좋은 꿈 = unpleasant (bad) dreams i.e. dreams which can be upsetting (at different levels of distress, including causing great anxiety and fear.)
악몽 = terrifying or disturbing dreams/nightmares i.e. dreams that cause a great amount of distress.
So a nightmare 악몽 is a bad dream 안 좋은 꿈, but not all unpleasant dreams are nightmares.