Before people developed fears of guns, of large animals, of killers and other scary things, we were scared of the dark, of a dark room and all kinds of dark places. These places all hold some negative significance towards us because darkness is one of the greatest fears that we all still hold to this day, especially when it appears in our dreams.
If you have a dream in which you see a dark room then this is the epitome of fears related to darkness. You are having this dream because some physical thing in your life is really scaring you. Maybe you saw a terrifying movie or maybe you are scared of a specific person that poses a real threat to your life, but whatever the case, you are dreaming of this because you are legitimately scared and you don't know what to do.