Rainwater is generally better. Chlorine, fluoride, bleach and such, which are in a lot of city water, may not harm your plants in the drinkable amounts, per se, but they certainly may harm the beneficial microbes in your soil, which will reduce the benefit you would gain from those microbes (which may be considerable). I find that my tomato plants last year preferred filtered water to regular city tap water, probably for this reason. They required less water and grew better when I filtered the water. I imagine rainwater is similar to filtered water.
Rainwater is probably pretty much devoid of minerals. It may contain chemicals via pollution, however, and your guess is as good as mine as you what those chemicals will do to your plants and soil microbes.
Well water, without chemicals added, has the potential to be better than rainwater, depending on your soil and the composition of the well water, because your soil may need those minerals. On the other hand, the minerals in the water may have come from the above soil in the first place, in part.