This is really more of an individual character question rather than a general one. Whether or not a soldier was religious depends on a soldier's personal situation, or life, before, during, and after the war, and as such it is difficult to say that there is a general stereotype. However, most war books do treat the idea of religion and god, or at the least faith, to some degree. This is typical in novels where we see characters experiencing life or death situations. It is in those experiences that questions about god and the possibility of afterlife come into play, and so many times these situations will give the reader an opportunity to see the character in terms of their religious beliefs, or even to find out if they have any.