The hell, yes. As a species we are hardwired to know about death and therefore to need an affirmation of faith of an afterlife in whatever way that choses to manifest. Characters in a book are no different as they are a sort of reflection of us. They therefore need some sort of religious framework to function under. Obviously, this doesn’t need to be an accepted Earth religion, but it does have to have standards and rules to live by.
At some point a character might question his/her god as to why bad things happen. Fine, as long as the framework is in place. The religion can be a good one, or a bad one. What matters is the character’s belief in it. A world, however different, must have recognizable structuring. Faith is a biggie.
Then again, it’s fun to explore what a world without domineering religions (in the least) might be like…
The religion/religions don’t have to be dominating, unless that is the point of the plot. I think they/it needs to be there just to round off the framework of the world. How much they influence depends on the story line. On the other hand, how does magic happen in fantasy unless there is some power source/divine being/ancient artifact providing it? That could be quite the conundrum.