Meursault, like Camus, is an absurdist and an atheist. Neither of them believe in God or the afterlife. This unnerves the magistrate and the priest to no end, both of whom want Meursault to believe in something, anything. So says Meursault:
none of [the priest’s] certainties was worth one strand of a woman’s hair. Living as he did, like a corpse, he couldn’t even be sure of being alive. It might look as if my hands were empty. Actually, I was sure of myself, sure about everything, far surer than he; sure of my present life and of the death that was coming. That, no doubt, was all I had.
This is the manifesto of the absurd hero: to love life, hate death, and scorn the gods. Belief does not engender life. Certainty in afterlife does not breathe life. Crying at a funeral does not affirm life. You might say all of these even lead toward death, since they negate life.
It doesn't matter that Meursault believes in God or the afterlife when he's being executed by the state. Non-sequitir. ("It does not follow.") Meursault refuses to believe in God, or cry at his mother's funeral, or show guilt for killing the Arab because all of these are external forces placed on him which limit his freedom and lead him down the path toward death, rather than life.
Accepting with dignity that death is the end of life is, oddly, the absurdist's answer to the afterlife question.