"sniper first attested 1824 in the sense of "sharpshooter."" Snipe are small birds with very
erratic flight. My father could hit them with a shotgun, but I could not. Challenging, but
in retrospect regrettable, since there was no meat on them, and they did no harm.

I think the Civil War use of snipers is related to that War seeing the first extensive use of
rifles instead of muskets, the rifle being far more accurate.