While we dream every night, we do not necessarily recall our dreams every night. Recollection and intensity of dreams can be affected by chemicals, diet, drugs, stress, anxiety, and sleep patterns, and even general physical health.
While we only produce narrative dreams during REM sleep, our mind is processing images and ideas while we sleep more or less constantly, although these are often not remembered, or only remembered for their results upon waking.
This often happens with scientists, musicians, mathematicians, artists, etc., who are working through a problem in waking life only to discover a solution upon waking, but unable to recall the dream that produced it.
Free dream interpretations