All conditioned experience can be compared to a dream. The outer world, experienced through one's senses seems so real and solid and consists of minute particles which can be split until they disappear. It is continually shared with others and involves body, speech and mind. What we experience at night is a private dream involving mainly one's mind.
Buddha likened the outer and inner worlds to dreams because nothing in them lasts. All mental and physical phenomena appear, change and then disappear. Mood, education, upbringing and background colour one's view. Furthermore we only experience the vibrations our senses can pick up and therefore do not perceive things as they are. For example, if we feel happy, everything seems beautiful and nice, and during unhappy states, everything turns terrible and difficult. Our perception is therefore both determined by outer conditions and by changing states of mind.
There is a certain wisdom in the dream state, because in it we are more aware of the unreal nature of things. The ease with which we gain or loose a million dollars in a dream, or are able to travel anywhere, actually shows a deep wisdom in the understanding of the nature of our mind.
If during a dream the awareness arises that one is actually dreaming, it is possible to spread the radiant clarity into the past and the future, thus becoming enlightened. Usually, this experience can't be held and upon waking up, it is forgotten. It is important, however, that if we become able to control our dreams, we may also be able to control our death. Resting in mind's clear essence during the process of dying offers the best chance for enlightenment. The Buddhist meditations aim directly at this. They produce the power to remain in mind's essence as naked awareness. (source: Diamond Way Buddhism Network)