Literary setting describes both time and place of a story. For the short story "The Sniper," the setting includes the historical events occurring at the time and in the place of the story. O’Flaherty wrote the story (published in 1923) after having been a soldier in the Irish Republican Army (IRA) in 1922 during the Battle of Dublin in which he fought against the English Provisional forces while they attacked the IRA-held Four Courts building, which is the group of buildings comprising Ireland's four principle courts of law. After a horrible period of violent fighting and bombardment, the anti-English IRA forces were defeated and the Four Courts destroyed to be rebuilt in 1932. After this raging battle, O'Flaherty fled, ironically, to London where he commenced to write down in "The Sniper" the essence of the insight he learned about civil war. This is the historic background that is part of the time and place--the setting--of "The Sniper."
If we narrow our focus from the historical setting to the particular situational setting of the protagonist--though not necessarily the hero--of the story, we see that it is 1922 in central Dublin and that we are near the O’Connell Bridge. Snipers line the rooftops while at least a few people walk now and then on the streets, such as the old lady who appears and points. The protagonist is lying on a rooftop behind the modest cover offered by the parapet (i.e., a low wall surround a rooftop). Hungry, thirsty and wanting a cigarette, he rapidly eats, drinks whiskey and takes a risk by lighting a cigarette in the evening light--he has been there since morning and it is now the evening of the day. The flicker from his cigarette does alert an enemy sniper to his position and draws fire his way. He looks out over the parapet, drawing more fire, then hugs himself to the roof. In the street below him, an armored tank stops and an old woman who has emerged from a side street points to the location of the protagonist whereupon he shoots first the man in the armored tank and then the fleeing woman who is an informant. This then comprises the opening setting of "The Sniper."
The elements of the setting that lend particular significance to the story are the parapet, the bridge, the side street, the rooftops that hide enemy snipers, and the darkening light of evening. These elements of setting each has significance to the development of the plot and/or to the development of character. For example, it is in the evening light that the protagonist complicates the plot by revealing his location to the enemy sniper (sniper: someone who is an excellent shot and shoots at someone from a place of concealment). Part of the very definition of "sniper" is "concealment": the sniper operates from a secret place, a place in which he is concealed from view. Thus, the evening light also serves to develop the protagonist's character: he exposes his concealment indicating that he is less disciplined than he needs to be and more rash (rash: acting without due consideration of or attention to consequences) than it is good for him to be. Similarly, the bridge introduces a major part of the early conflict in the plot, which the sniper resolves by shooting the enemy and the informant (in war, it is correct for a soldier to act as he has done) while also revealing that, though rash and somewhat undisciplined, his character is in earnest (i.e., having sincere and intense conviction) about his role in opposing the enemy.