How do character and setting details create the tone and mood of the novel and what was the author's purpose?
This is a huge question. I'll try to give you an overview of the main tones that set the stage for everything else.
Remember, first of all, that the book is an account of WW1 through the eyes of a young German foot soldier. The two things he speaks of most are of the death and destruction of the war itself (and fear of it when he is not on the front lines) and the camaraderie he is forming with other soldiers. Because so many of these men die (and ultimately, the narrator does as well) you could probably sum up these ideas with words like: tone of rememberance or an elegiac tone; a fear and reverence for death; tones of comaraderie and loss.
I will let you choose one of those ideas and fill in the details - but ultimately I think the author's main purpose was to paint a gruesome picture of the reality of war - the complete destruction of it (and death) on an individual, but also the way it has the ability to bring men together like nothing else does.