In the first paragraph, the word "dark" is used twice. The city is "enveloped in darkness." The pale moon light shines on the dark waters of the river. Dublin's main court building (the "Four Courts") is "beleaguered." This means it is in trouble, under attack, and/or surrounded by military. Guns are going off "spasmodically" which is to say suddenly and randomly. So, in analyzing only the first paragraph, we have literal and figurative notions of darkness. The landscape is a war zone and there are sudden (or spasmodic), violent sounds of gunshots. The mood established here is one of darkness and violence.
The sniper is described as having the face of a student but with the cold stare of the "fanatic." A once innocent young man has become a stoic soldier, one "who is used to looking at death." With this description, the author adds the idea of the loss of innocence and the prevalence of death. He is so used to this state of affairs that he doesn't hesitate in killing and old woman who's given away his position. It is war, and one can not fault him for protecting himself. But this cold way of killing, a characteristic of war, is still quite dark and violent. This is illustrated by the description of the woman's death as she "fell with a shriek into the gutter."
After this incident, the sniper comes up with a plan to trick the enemy sniper. His trick succeeds. But before he shoots the enemy, he smiles. This once innocent student has become so used to killing that he is able to smile at the thought of killing one of his own countrymen. The smile seems sinister and dark, thus fitting the mood of the story.