@Harp beat me to it.
(Most) dreams take place during the REM portion of the sleep cycle. It is known that if you wake up during REM or soon thereafter, the chances of recalling the dream in itself is significantly higher.
“Bad” dreams generally invoke a negative, high-energy, emotional response. You are more likely to slip into consciousness during a “bad” dream because of this. If you are having a blissful, peaceful dream, chances are it is keeping you grounded in the sleep cycle.
That, and there is that saying: “Pain is infinitely more rememberable than pleasure.” Though our minds seem to be tailored to forget all the particular nuances of physical anguish, mental distress is not so fettered.