Edgar Allan Poe, as a master of terror, uses every mechanism possible to adhere the reader to the story, and to appeal to the senses and emotions of the intended audience.
This being said, the use of space and setting create the atmosphere that is required of Gothic stories to instill in the reader the feeling of emptiness that comes as a result of a vast exposure to a dry and cold setting. However, Poe's uniqueness as a writer is shown in the way that he contrasts settings to create an even more terrifying sensation.
For example, in The Cask of Amontillado, the story begins in a cheerful and festive setting. People are celebrating, drinking, eating, and having fun in the carnival. As it is known, the carnival is similar to a Mardi Gras, or Fat Tuesday, where people enjoy their most sinful delights right before fasting for Lent.
It was about dusk, one evening during the supreme madness of the carnival season, that I encountered my friend. He accosted me with excessive warmth, for he had been drinking much. The man wore motley. He had on a tight-fitting parti-striped dress, and his head was surmounted by the conical cap and bells. I was so pleased to see him that I thought I should never have done wringing his hand.
Similarly, Montressor allows Fortunato to enjoy his festivities, for he is planning his death in a dark, damp, horrid and secluded place. The three settings of a) the carnival, b) the walk through the catacombs, and c) Fortunato's grave, are allegorical of a transition from heaven, to purgatory, and then hell.
At the most remote end of the crypt there appeared another less spacious. Its walls had been lined with human remains, piled to the vault overhead, in the fashion of the great catacombs of Paris. Three sides of this interior crypt were still ornamented in this manner. From the fourth side the bones had been thrown down, and lay promiscuously upon the earth, forming at one point a mound of some size. Within the wall thus exposed by the displacing of the bones, we perceived a still interior crypt or recess, in depth about four feet, in width three, in height six or seven. It seemed to have been constructed for no especial use within itself, but formed merely the interval between two of the colossal supports of the roof of the catacombs, and was backed by one of their circumscribing walls of solid granite.
Poe brings a brilliance to the narrative by making Montressor tell the story from his convoluted and obsessive point of view. This actually makes the settings seem even more tragic.
In all, the tragedy of the story is mainly accentuated by the settings: From a lighthearted and festive carnival to the deep, dark and scary isolation of a man-made grave in the catacombs, the story clearly goes from light to darkness in a very small time frame.