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.