One reason O'Flaherty does not use the sniper's name in the story is to increase the universal reach of the story.
A significant part as to why "The Sniper" is such a powerful story is because it can be applied to any military conflict. The realizations at which the sniper arrives at the end of the story are human truths. When the sniper experiences how "the lust of battled died within him" and began "cursing the war, cursing himself, cursing everybody," it represents the human experience of regret and remorse. At this moment, the sniper recognizes the human cost of war. It is enhanced with the revelation that the sniper's target was actually his own brother. What the sniper understands about war is something that, sooner or later, everyone realizes about war.
In not naming the sniper, O'Flaherty makes war a shared condition. By the end of the story, anyone can empathize with the sniper. He is living proof that there is nothing "civil" about war. He embodies the painful condition of war and the toll it takes on people. When the sniper is not named, he becomes an "everyman" of sorts. It is clear that O'Flaherty wants to make a statement about war in the modern setting. In not using the sniper's name, the story can be appreciated in a wider way. Even though its setting is during the Irish Civil War, it is a narrative that could very easily take place in Syria or the Ukraine or in any other part of the world. Part of this comes from not naming the title character.