During his sentencing and right after, the narrator is incredibly groggy and confused. He can't see very clearly, and almost appears to be having hallucinations--he fixates on the candles in the room, thinking they are angels of light coming to save him. The voices of the judges are distorted. Then, he "swoons" and goes on for 2 paragraphs about dreams, hallucinations, and a very confused, almost altered state of consciousness before he wakes up in the dark prison.
His descriptions of his state--"I was sick, sick unto death," and "I felt that my senses were leaving me," and "dreamy indeterminate hum," his confused visions and state of mind, all seem to point to him being drugged. His being drugged, and probably being very emotional and stressed from the situation, led to him swooning, or, fainting. In this state, eyes closed, partially conscious, he can't see anything anymore, and remains that way until he wakes in his dungeon of a prison. That is why he can't see anything, and then of course, when he wakes, his prison is pitch black, so he can't see even when fully alert, conscious and looking around. His persecutors drugged him, and carried him down into his dungeon, to enact further torment.
I hope that those thoughts helped; good luck!