The mood of a story is a literary device that creates a certain "feel" for the work as a whole and is done through wording and descriptive narrative. Edgar Allen Poe was a master at setting a dark, disturbing mood for his works.
The setting of the story can greatly affect the mood. For example, if the story is set in the slums of post-war Poland, the reader should feel the poverty and desperation.
An author may set the mood by the voice of the story. Speaking in first person allows the author to narrate and affect the story by conveying personal feelings, thoughts and beliefs.