If your sniper is good at sniping, then:
If the enemy is shit, more than one of them die and now you can fight them at a numerical advantage
If the enemy isn't shit and uses cover/harasses the sniper, they're now distracted by having to do that or get sniped and/or their rqnge of movement is restriced- they're locked down in cover as long as the sniper is ready to shoot them if they pop out, so you have the advantage in fighting them or setting up to fight them.
In the end, no class is good alone versus a team- you have to work together as a team. If you have a sniper on your team, he has to work around you and you have to work around him; he locks down enemies (or better, just kills them) so you can complete the objective and kill the enemy team because they're missing a team member or two, and if they try to fight you out in the open, they're in danger of getting lolheadshot-ed. In return, you have to help your teammate so they can do their job.
A sniper's a bit like air superiority. They're only really useful when they're uncontested on their own playing field; two snipers having a sniper fight aren't helping either of their teams, but if a sniper's sitting in a good location and there's nobody on the field that can hit them easily, they can be really useful… If they can hit their shots.