We can understand that from the formation of rainwater. Before it becomes rain water, it becomes water vapour. water vapour is not a liquid stage, so dissolved impurities are not possible in water vapour. So, when it converts to rain water also, dissolved impurities are not possible.
However rain water may contain other impurities like sulphur dioxide, nitrogen oxide and mercury etc which even causes the acid rain.
In the case of well water, its a open liquid source of water which is exposed completely. So, something from the point of contact at soil can be dissolved in water over time. Also, something which falls from the upside of the well can mix in the water.
So, its highly likely that well water may contain dissolved impurities.