Tolkien was a Christian, and he writes about his faith as an important part of his creative plan for The Lord of the Rings. At the same time, Tolkien emphasizes that Middle-earth is not a specifically Christian place: "I am in any case myself a Christian; but the 'Third Age' was not a Christian world" (source, pg. 220). Middle-earth is not a Christian allegory the way that Tolkien's friend C.S. Lewis's world of Narnia clearly is.
Yet, even if Middle-earth is not Christian, Tolkien also writes that, "The Lord of the Rings is of course a fundamentally religious and Catholic work; unconsciously so at first, but consciously in the revision." (Source, pg. 172.)
So, while the characters in the world of The Lord of the Rings are not Christian, the ethical themes of the book have been strongly and "consciously" (in other words, intentionally) influenced by Tolkien's faith. The fact that Tolkien thinks of Gandalf as an "incarnate angel" and that he describes Frodo's sacrifice in terms of the Lord's Prayer (see our "Character Analyses" of Gandalf and Frodo for more on these examples) shows the "fundamentally religious" ideas that Tolkien draws upon to portray Middle-earth.
The question of Tolkien, Christianity, and morality in general is complicated, to say the least. After all, Tolkien's faith helps to determine how he thinks of Good and Evil, which is the most basic source of conflict in The Lord of the Rings series.
But at the same time, these books aren't straight representations of Christian faith. The whole point of Tolkien writing the Silmarillion is to provide a new system of belief for the characters in Middle-earth, which may have themes in common with real-life Christianity but which is not itself Christian. (See our "Character Analyses" of the Valar and Elbereth Gilthoniel for some examples of Tolkien's new mythology.)
Whether or not you choose to consider Tolkien's religious faith as you read The Lord of the Rings is totally up to you. His faith is part of the morally complex world that Tolkien creates in this series. But no matter what context you attach to The Lord of the Rings, it continues to be story about the struggle against greed and lust for power against a backdrop of cool creatures and fantastic places. It's got something for people of all religious and philosophical beliefs.