I recently visited a railway museum with a lot of Soviet-era locomotives. The picture below shows the wheels on a locomotive from the 1930s or 1940s. Some of the wheels are thicker on one side (as it it were a partially filled cup). What is the purpose of that?



(Now that I am looking at the picture again I wonder if they are balancing the weight of the coupling rods in some way.)

Those are counterweights. They work exactly the same as those lead counterbalance weights on the wheels of your automobile. 

If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train.
