Putting religion in a novel is always a tricky thing. Unless you’re specifically writing Christian fiction, it can be easy to turn some people off. That’s probably why most fiction tries to avoid the topic of religion, other than the odd mention of a holiday or whatever. More often then not, especially in fantasy, if religion is mentioned, it’s just a product of the author’s imagination.
Numerous books use fake religions, such as a Song of Ice and Fire, Forgotten Realms, The Stormlight Archives, etc. Some of the religions are completely alien, while others are thinly veiled copies of actual religions, and are used to deliver commentary. I feel using a fake religion is often best if you want to avoid offending anyone.
Mentioning Christianity is something that should be avoided in most cases. Either you’ll get a lot of eye rolling or angry folks, depending on what your write and who’s reading it. Now, if it is essential to the story or the character (like Matt Murdock, for instance), then by all means, go ahead, but remember to tread lightly. Most of the Western world is Christian, or at least familiar with Christianity. As such, it’s ok to be vague. It can be easy to say the wrong thing and offend your audience (unless that’s part of the point, like The DaVinci Code). I’m not saying you can’t or shouldn’t make a character religious, I’m just saying you should try to avoid going into detail about it if you can. (Just look at Harry Potter. They celebrate Christmas, but Jesus is never mentioned.)
When it comes to other, less popular religions, such a Islam, Hinduism, or Judaism, you can afford to go more into detail. Chances are, most of your audience isn’t so familiar with it, and will find it interesting without being offended or the like. After all, much like fantasy religions, they don’t have a horse in the race. Friday the Rabbi Slept Late or the new Ms. Marvel aren’t just interesting because they’re good stories that are well written, but also because you feel like you’re exploring a new religion. It gives you a bit more leeway.
Personally, other than the odd throwaway comment, I try to avoid mentioning religion in my writing for very much the same reason I avoid language. The less people you upset, the wider audience you have.