The atmosphere in Liam O'Flaherty's short story "The Sniper" is created through the story's diction (word choice) and additional imagery in the form of literary devices.
Words and phrases that are used in the story's introduction include darkness, dim light, dark waters, beleaguered, guns roar, machine guns, and rifles.
Dublin lay enveloped in darkness, but for the dim light of the moon...
Around the beleaguered Four Courts the heavy guns roared.
These carefully selected words and phrases—which are representative just of the first paragraph—produce mental images for the reader of the story's mood, just as the author intends. Darkness is a strong motif in the story.
The solemn mood generated in the first paragraph is continually woven throughout the fabric of the story. Other words include cold gleam (often associated with a gun), fanatic, death, and again, darkness. The motif of darkness is perpetuated as the story develops. For example, when the Republican sniper tries to smoke a cigarette, the light from his match draws the attention of the enemy sniper who shoots at the light, and the brief illumination is distinguished. This foreshadows a sense that light will not soon return to the sniper's life nor to Dublin (nor the country of Ireland).
Using personification, an armored car is described as "panting" and is later called "the grey monster."
By the time the Republican sniper stops to see if he knows the identity of the dead enemy sniper, the darkness of the story's message has prepared the reader for the tragedy exposed in the story's last sentence.
Then the sniper turned over the dead body and looked into his brother's face.