Religion functions as a means of self-identification for many of the characters in the novel, including John and Gabriel.
These two characters struggle to attain an identity that is satisfying to their own hopes and expectations for themselves and to the expectations they perceive others to have for them.
To Gabriel and John, religion is a matter of posturing, of behaving in certain accepted ways for the benefit of those watching. (eNotes)
Additionally, religion can be seen to provide an atmosphere and setting for the novel. The language of the text is influenced by the language of the church and much of the story takes place in a church.
The variety of ways that individuals relate to and "use" religion in their lives is also indicative of the variety of identities at work in John's family. This is especially significant in the way that religion becomes a center of conflict (and the means through which that conflict is carried out) for nearly all of Gabriel's problematic relationships.
Clearly, religion is a charged concept in the novel - charged with importance, expectation, and even desire.