Much has been made about Tolkien's dislike of allegory in light of his friendship with C.S. Lewis, author of the famed fantasy series The Chronicles of Narnia. The Chronicles of Narnia with their rich typology are often cited as an example of Christian allegory, particularly the figure of Aslan/Jesus. While it's true that Lewis intended to illuminate Christian truths through these books, it's less accurate to call them allegory in the strict sense.
In fact, if The Chronicles of Narnia are allegory, so is The Lord of the Rings. Both Lewis and Tolkien were steeped in Christian doctrine, and it necessarily found its way into their work. Aslan dies for the sake of his spiritual children much the same way Gandalf sacrifices himself in Khazad-dum; just as Edmund finds the pleasures of sin to be fleeting at best, so too does Frodo learn how great a weight transgression can become; and the parallels go on and on.
Strictly speaking, neither of these fantasy works are true allegory. Allegory as a literary form came into its own during the Middle Ages, and was represented best by works like William Langland's Piers Plowman and The Romance of the Rose. In these works, ideas and abstract concepts are personified and become the characters in a fictional narrative that represents through extended metaphor the human experience in the real world, particularly mankind's relationship to science, politics, religion, and philosophy.
Piers Plowman is one of the most important Medieval allegories, mainly because of the influence it held over subsequent works, including Chaucer's Canterbury Tales and John Bunyan's The Pilgrim's Progress. In the poem, the narrator Will has several dream-visions. During several of these he's accompanied by a model of Christian sanctification named Piers, who contrasts for Will both the beauty of salvation through Christ's death and resurrection, and the darkness of the fallen world.
During the course of his dream-travels, Will meets a variety of characters with names like Holy Church, St. Truth, Conscience, Liar, Reason, and Do-Best. Each of these characters is presented in human terms, but they also represent exactly what their names suggest. This is the soul of traditional allegory: the thing represented is also the thing presented. To put it another way, the character's name and the character's identity are one and the same.
Protestant readers will probably be more familiar with a more accessible work, the Puritan John Bunyan's great masterpiece The Pilgrim's Progress. In it, Christian moves from justification through faith in Jesus Christ, to sanctification, to the final attainment of glory after death. Worldly Wiseman, Prudence, and Apollyon all make appearances either to foil or aid Christian in his struggle toward eternal life in the Celestial City.
Not all allegories are theological, though it's safe to say they all deal with deep issues. Sir Thomas More's Utopia and Sir Francis Bacon's New Atlantis both have elements of Christian doctrine embedded in their narratives, but the focus of those two works is the nature and character of the ideal national state. These small books were also among the first wave of what would come to be considered modern literature, and therefore showed a strong break with works like Langland and Bunyan.
In the beginning of the Modern period, man began to move away from divine authority toward human reason as the basis for knowledge. The break wasn't yet complete, and so writers like More and Bacon still made reference to divine authority, but whereas the only proper subject of Medieval Christians (and Bunyan, though early modern, was still largely Medieval in his thinking) was God and the Christian life, the main subject of early moderns was humanistic philosophy.
Thus, allegory took a new shape. In the fulness of the modern period, it looked quite different: one of the best modern allegories is George Orwell's Animal Farm, in which animals represent people and ideas involved in the Bolshevik Revolution and the Communist state of Russia. The characters were no longer direct corollaries of what they represented, and discovering who was who took a bit more effort on the part of the reader.
On the whole, however, allegory has become an outmoded form. Influenced by empiricism and the idea that the only discernible truth is present in physical, external realities rather than metaphysical realities, writers have turned increasingly toward realism, adding infinite detail to narratives rather than infusing them with actual meaning. Realism, in this sense, is an ironic appelation, since it refers only to appearances. Medieval allegories were, in a sense, much more "realistic" in that they dealt with man and the world as they truly are, not merely as they appear.
In the sense that The Chronicles of Narnia and The Lord of the Rings are "realistic" in this metaphysical sense, they're allegorical; but in the sense that there's no one-for-one corellation between each character and a specific concept, they aren't. Both works are definitely metaphorical, but they're also fantasy stories that can be read as such without reference to deeper truths, historical persons, Christian theology, or human philosophy.
Perhaps the greatest Modern Era allegorical writer was G. K. Chesterton. While there isn't a one-to-one relation between concepts and characters in his novels either, he does use characters to explicitly deal with real issues. Unlike traditional allegory, he also infuses a generous portion of humor and comedic style, thus making his points in many ways clearer, and certainly more enjoyable to read. Whether or not allegory needs to be resuscitated as a literary genre is for others to decide, but its past iterations definitely include a number of works that deserve to be rediscovered.