In Edgar Allan Poe's horror story "The Pit and the Pendulum," the narrator, after being sentenced and swooning, wakes up in a cell that is pitch black, which he feels is "the blackness of the eternal night." This deep blackness represents the depths of fear that the narrator experiences--the exact fear that is a key tool the inquisitors use as part of their torture. This fear has three aspects: fear of the unknown, fear of the future, and fear of death and the afterlife.
The first thing the narrator wonders when he experiences the darkness is whether he may have been buried alive. Not knowing whether he may be in a tomb causes him to panic. He dreads to take a step lest he run into the "walls of a tomb." When he realizes that is not the case, he "breathed more freely." However, he continues to be afraid as he makes the circuit of his cell, not knowing what he may find. When he trips and finds his face hanging over the edge of the pit, he begins "shaking in every limb." One of the things that bothers him most is the idea that there might be many such wells "in various positions about the dungeon." He also contemplates what might be down in the well and becomes "the veriest of cowards."
When some light comes into the cell, the narrator's fears continue, although some fears of the unknown have been relieved. Still, there is a darkness of fear that shrouds the future and the afterlife. He fears the future, for he continually wonders what new tortures the inquisitors are devising for him. He fears death and the afterlife, which are evident by the description of the "blackness of the eternal night" and the "really fearful images [that] overspread and disfigured the walls," pictures of demons that might await him in the afterlife.
Besides being literal, the blackness in the story is also symbolic of the great fear that the narrator's torturers sought to instill in him.