The sniper barrel provides a very large increase in damage and range, at the cost of higher recoil, reduced ammo capacity and hip fire accuracy.
There are three red lights on the barrel. Wait for all three to illuminate to deal maximum damage when firing.
The recipe for this weapon mod varies depending on the weapon for which it is made:
Fiber optics (3-8)
Sniper barrel (1)
Can be crafted at a weapons workbench.
This article is too short to provide more than rudimentary information about the subject. You can help Nukapedia by expanding it.