CS Lewis' Chronicles of Narnia is very allegorical. You can read it once and easily put Aslan in the role of Jesus, Lucy in the part of The Holy Virgin. Edmund is symbolic of the betrayal of Man, so Aslan (as Jesus) had to die for his sins, that he might be saved. He eat the forbidden Turkish Delight. Jadis is given the part of the Devil. And if you look deeper, Peter is given the part of Peter, and Susan the part of heresy. Its alright in the beginning, but then it goes farther and farther away from the Truth.
So there you have it. Easy to see, not that it is all that simple...but this is not about CS Lewis, it is about his best friend JRR Tolkien.
Tolkien rejected the thought that the Lord of the Rings was at all allegorical. He disliked Allegory. And, in fact, there is no reference to God, or the Church, anywhere in his stories, nor did he intend there to be.
Some people, trying to make it fit an allegorical mindset, might say that Gandalf was cast as Jesus, and he died that other's might live. You could say that Galadriel was Mary, and Sauron the Devil. But you could just as well say that Frodo was given the part of Jesus, so he must Perish that all might live. Eowyn could be cast as Mary, and the Witch King as the devil. The truth of the matter is, you could cast any number of different characters in different roles. And it still wouldn't quite work.
No one in this story has any reference to a god, or to any kind of religion or cult or anything at all like that. Gandalf once mentions what could be shown as Heaven, the white shores and the swift sunrise, but there is no mention of some king that dwells there that could be a god. Greater powers at work in the world are often mentioned, but not in a way that suggests that someone is responsible for them.
And yet, somehow, the Lord of the Rings still has a very Christian message. How?
Some of the answer is found in The Silmarillion which (despite his dislike of allegory) contains a splendid allegorical retelling of the Creation and The Fall.
Here Tolkien does name the creator-God of Middle-earth, Eru ("the One,") as well as the mighty spirit Melkor, who rebelled against Eru and went into darkness. We also learn that Sauron, maker of the One Ring, is himself an agent of this Melkor. Tolkien thus establishes a direct relationship between the theistic, even Judeo-Christian cosmology of The Silmarillion and the war for the One Ring recounted in The Lord of the Rings.
And yet, The Lord of the Rings all on its own is still very Christian.
In the Lord of the Rings itself there is no mention of Eru, nor is there any explicitly religious component to the characters’ behavior. And yest, Tolkien’s Catholic worldview not only stands behind the saga of the Ring in its prehistory, but surrounds and suffuses it in its overarching themes and imaginative structures.