Knowing where a sniper will set up on any map is critical knowledge for everyone, the snipers, the counter snipers, and the infantry that are sniper targets. There are two main ways to deal with a sniper, either take him on, or use a route and spots where you can deny the sniper a shot.
When you look at a map, scan for areas where a sniper can operate effectively. Large field of view, quick cover, and easy movement make good sniper spots. Read the maps, and learn how you can either outflank those spots, or avoid being in the field of fire.