The devil is a common Archetype explored in dreaming. One can have unconscious associations with the devil because it can represent a type of power within that is unexpressed and appears frightening or disturbing. This power is usually associated with all the wonderful things that were viewed as making us different from others, and were therefore repressed. Resurrecting this part of our natural self is important in helping us to actualize our destiny.
The devil can wear the mask of the critical tapes of conscience that would prefer we do right and not rock the boat of conformity. Joseph Campbell called this area "thou shalt" in his wonderful work on how myths can guide us to actualize our purpose. He also wrote: Gods become devils, and often it is these devils whom we first encounter when turning inward." Like dreaming, the hero undergoing initiation will first discover the clues that will reveal one's true identity. Like any good story, just when it seems the hero is home free, the monster appears to scare the hero back into a fearful world of seeking only acceptance.
In dreams, we are the hero who must slay the dragon as a powerful symbol of claiming our rightful power. Dreams are like the mythical tales of mortals who confront frightening giants and beasts to succeed - only by doing so are we worthy of our destiny. By confronting one's deepest fears, we discover the magical elixir that releases us from our shackles and misunderstandings. In fact, it is common when one is going through a type of transformation that includes honesty and self-examination that these type of Shadow dreams come forward. Confronting fear and transforming it into self-actualization is a necessary part of the hero's journey of individuation. See Shadow, Evil and Demons.