One of the most fundamental fears is fear of the unknown. And nothing is more unknown when it is in complete darkness.
Being surrounded in darkness is a foundational component of horror. It is part of telling stories around a campfire, when you are surrounded by the darkness of night. It is part of most horror movies, where a creature or ghost lurks just beyond what a person or the audience can see. And it often used in horror books and stories, cluing people into what is there little by little in order to build tension.