The ancients found the darkness a source of great fear, and so dreaming of darkness could be calling your attention to a fear you have that needs to be dealt with.
Darkness also hides one’s surroundings, and so darkness in a dream could indicate that you are “in the dark” about something, and need to find the truth.
If you walk through the darkness into the light, this is showing you that you will indeed find the truth, and success will come your way.
If a storm causes a bright day to suddenly turn into darkness, this is a warning not to get too complacent with your present circumstances, and to save for “a rainy day.”
That side of the personality where chaos may reign, and where, unless some spiritual understanding can be attained, is seen as dark. Also darkness is full of mystery and part of the unknown, the obscurity which hides the divine.
Psychological / emotional perspective: Intellectually, we are in touch with the hidden side – the shadow – and may need to deal with the darker suppressed aspects of ourselves.
To be surrounded by darkness suggests that there is potential for failure in some scheme or a sense of being lost.
Material aspects: To dream of being in the dark usually represents a state of confusion or being in unknown and difficult territory. It may point to a secret part of ourselves or a part that we do not yet know.