Sniper
The sniper is a long-ranged class with the ability to one-shot any enemy in the game (except an overhealed heavy with the Fists of Steel active, any ubercharged player, a spy with Dead Ringer active, and Bonked scouts). They are valued for their ability to get key picks without directly engaging the enemy team. In a typical 6v6 format, the sniper is considered an offclass, played only when a situation presents itself, most often when a team is at an uber disadvantage, or holding the last point. The main downfall for teams running a sniper, however, is that during an uber fight snipers are practically useless, and that they have very low direct combat abilities. Snipers primarily target the enemy Demoman and Medic, due to the ability to change the direction of a game through key picks.
6v6
Main Article: Sniper (6v6)
In 6v6, Sniper is considered an offclass, however the Sniper is one of the most common offclasses you'll see in the game. Sniper's rely on map sightlines, and tend to lay behind the front lines, in an attempt to pick off enemy players from afar. Snipers are incredibly weak against close up scouts and roaming soldiers; which is why a team should work to protect their Sniper, when they have one. Most of the time, Snipers are used to defend or attack the last point of a map. When attacking a last point, a Sniper usually attempts to pick any player available to give his team a number advantage with which to push into last.
Highlander
Main Article: Sniper (Highlander)
The Sniper is considered a pick class in highlander, used to support his teammates while sitting back away from the battle. The Sniper's main job is to kill the enemy combo and the other sniper, while taking out unsuspecting enemies in the process. He is very important for holding positions and denying area from enemies; a skilled sniper can pick off any careless players venturing into his sights, and thus can hold a team back from pushing. However, he does need protection, which usually comes in the form of a Pyro or Gunslinger Engineer.