Like the magician Prospero in Shakespeare's The Tempest, the Prospero of "The Masque of the Red Death," tries to create an alternate reality. Prospero actually creates something like a work of art in that it is removed from the world. He walls himself and a thousand of his upper class friends into one of his abbeys in order to escape the red death. In effect, he is trying to escape mortality. Even though they hide in this seemingly impenetrable fortress, death finds them. This suggests that one of Poe's themes is that death is inescapable. The plot is based upon Prospero's attempts to escape death. So, the plot has everything to do with this theme.
There is also a theme about social class. Prospero summons his upper class friends to survive the plague. Meanwhile, masses of people are dying outside his walls. But he and his guests sing, dance, and throw parties. They do not care for those suffering beyond the abbey walls. The issue that they are being immoral is clear. But this could also be seen as a social allegory. This is a criticism of any aristocratic, rich, or elite group who only look after their own interests and do not care for the suffering of the majority. Prospero and his guests represent these types of immoral characters. The fact that death does eventually get to them proves that death is inescapable. But in this political/social allegory, it also shows that the elite members of society are not safe from the realities of life, whether this would be death or the revolt of the people they rule over. Death breaking into the abbey could be interpreted (in this allegory) as the people taking down the rich or the state governments. Think of the French storming the Bastille in 1789, an event Poe would have knowledge of.