Most tanks of the Second World War had a maximum armor of about 30 mm. Thus, most weapons that were not specially designed as anti-tank weapons had no effect on them.
Snipers however were one of the few heroes capable of disrupting a tank if they had some luck. Some of the tanks, especially in the beginning, had little armor and were lighter, which meant more targets for sniper fire. The most suitable areas to shoot were hatch, sight glass and in some rare cases some area where a smaller armor could lead to internal mechanical or fuel problems if it was pierced by a bullet. The latter was really difficult to perform since the internal structure of the tank to be shot down was not usually known either.
Where sniper rifles could shine in the battle against tanks was when their stage was about to make repairs to the tank or stopped to rest and drink tea. When a stagecoach leader peeked through the hatch, a head shot could disrupt an entire stagecoach. With no place to hide while the tank was being repaired and no way to start the tank to leave, a sniper could, from a safe distance, pick off the members controlling the tank one by one.
However, there are stories of snipers who managed to destroy tanks with a lucky shot.