What effect does the war have on Tim's acceptance of his religion?

When the story begins, Tim frequently berates himself for actions such as daydreaming or lying, actions that he considers sinful. He notes in church that God can punish anyone he wants to punish, and for this reason Tim fears that God will punish Sam by letting him die in the war. As the story progresses, Tim's worries about God lessen and he begins to worry more about practical matters like the mechanics of the tavern, or how to escape the cow-boys. This practicality is shown clearly right after Sam has been taken away as a cattle thief, when Mother wants to pray and Tim simply wants to collect the dead cow before someone else takes it away. At Sam's death, Tim tries to pray, but is unable to, and the idea of prayer falls out of his mind when he sees his brother drawn up the hill and shot. Once the urgency of the war has ended and time has passed, Tim looks back on his life and speaks of the happiness he has been granted "with work and God's will," a sentiment that suggests he has regained his religious conviction. However, he says it with a subtle deliberation of phrase, as if to suggest that he decided to practice religion but did not have much use for it after its uselessness in the war. The ending leaves us to wonder whether Tim believes that God has given him, but not Sam, a good long life, or whether he believes that he and Sam simply created their own endings.

Thematically speaking, is there a reason why Sam has to die and Tim has to live?

In terms of the novel's project, it is necessary that Sam become one of the war's victims in order to show that the war can swallow up even its most dashing and bold participants for the most inane reasons. Sam's death also shows the futility of glory. We assume that Sam fought with valor and strength, but we see that he dies in the least glorious way possible. Tim, the admirer and onlooker, has assumed the role of recorder of facts and impressions, and must act in relatively safe ways in order to provide a foil for the more extreme hero, Sam. Like Ishmael in Moby Dick, or Nick in The Great Gatsby, the narrator lives on the outskirts of the action and lets the hero take center stage.

What is Tim's ultimate take on the war? Does he ever decide which side has his loyalty?

By the moment of Sam's death and the end of the story, it seems that the British side has offended Tim the least. Although Tim vomits as he watches them lop off Ned's head and take away Jerry, his run-ins with the Rebel army affect him in the most profound ways, since they take away his father and his brother. By the end of the novel, Tim has ceased to expect anything from either army and he draws into himself, realizing that both sides will commit crimes of hatred and desperation in order to gain on the other. When we see Tim at age sixty-four, he feels pride at living in a free country, but he also seems to value the quiet life he lived in prewar America. In a way, independence has affected Tim very little, other than having taken away so many of his loved ones. Tim is perhaps not loyal to either the British or the Americans; rather, he is deeply loyal to safety and tradition, and to Sam. His only political conviction is the hope for peaceful isolation.