Why is it that sometimes, when we wake up, we are able to remember what we were just dreaming, but sometimes we don't remember any of it?
Scientists say that people can have multiple dreams every night and the ones that are not very significant are easily forgotten. Only those experiences that elicit an emotional response (happy, frightened) seem to stick in memory. Suggestions have also been made that being anxious or depressed makes our dreams stick to memory too (reference). A study suggests that people woken up during REM sleep seem to recall their dreams more often (reference). Here is a link to some common questions about dreams.