You really need to filter it first.
If you wouldn't drink it, don't cook with it (also good advice re: wine).
There seem to be sources on the internet regarding how to make rainwater drinkable, so I would start there.(example: http://www.rain-barrel.net/drinking-rainwater.html )
If you're already drinking your rainwater, and haven't died yet, it's probably safe to cook with.
If you're planning on using it as an ingredient in baking, or any dish where the pH is critical, you may want to actually test the pH of the water you're putting in and try to balance the recipe accordingly (substitute some baking soda for baking powder, for example).
cooking.stackexchange.com/users/2047/Bob
As long as you don't live in an area with bad acid rain, and you are catching it in a sanitary container without running it through gross gutters etc, it would be fine.
cooking.stackexchange.com/users/1393/Michael Natkin
Rainwater, straight out of the sky, is generally safe, with some caveats depending on the location.
For example, in a polluted area, it's probably not a good idea.
The 2 biggest issues are primarily how it's collected and how it's stored.
Collection and storage are where rainwater can easily become contaminated by either chemical pollutants or biological pathogens.
So, if you want to replace your tap water with rainwater, it'll take an investment in sanitary collection and storage devices/methods.
BTW.
On desert hiking trips I have used rainwater collected from a tarp dripping into a pan and then filtered through a bandanna to remove dust.
I had no worries since the terrestrial sources were questionable.
cooking.stackexchange.com/users/1759/wdypdx22
I would happily drink rain water in any amount, in most situations.
But how that rainwater is collected and stored is a big deal.
For example: Roofs often have dirt and animal feces on them, and many roofing materials are treated with toxic chemicals.
Dirty, standing water is a breeding ground for bacteria, algae, and insects.
cooking.stackexchange.com/users/2054/Jay Bazuzi
As long as there hasn't been a recent chemical, biological, or nuclear attack you should be fine.
Acid rain shouldn't be much of a problem since it's only slightly more acidic than regular rainfall (which is already acidic).
cooking.stackexchange.com/users/60/hobodave
Keep in mind that tap water is tested to ensure it's safe for human consumption.
Rainwater has no such requirement.
While rainwater seems to be a happy-fuzzy natural resource, I'd like to stress that this could be a serious safety issue.
Yes, it seems unlikely, but you need an authority who knows their water.
I suggest seeking out a professional opinion on how to properly filter rainwater.
Possibly from the people who handle your municipal water supply.
cooking.stackexchange.com/users/1601/Goodbye Stack Exchange
It is safe to use water from streams, rivers, and lakes in the US (not including those affected by nuclear power plants) if you boil the water to a rolling boil and keep it there for 3 minutes first.
This kills bacteria which commonly live in bodies of water.
Rain water is unlikely to have giardia living in it, unlike streams, but sources indicate that it may contain some bacteria depending on the collection method.
Therefore keeping your rain water at a rolling boil at a minimum for safety purposes.
Note that at least one scientist from Argonne National Labs also recommends filtering , but several others on the same site indicate that rain water should be perfectly safe.
Does this question mean we will shortly see rainwater cooked meals infiltrating the trendiest restaurants?
cooking.stackexchange.com/users/1816/justkt
I live in Australia, outside city about 30 mins and 10 mins from the water.
I collect straight from big plastic bins after it rains then bottle in your soda litre drinking bottles.
I then boil it, let it cool and return to litre bottle and then fridge it.
Tastes clean and as far as the process of precipitation, collection, boiling, cooling and bottling, it is common sense easily safer without the chemicals in treatment and pipeline rust corrosion of internal piping from standard water supply!!!!
Make sure to keep your plastic collection bins are food grade at least, keep them out of the sun and clean before use!!!!
Also I have read that chlorine in supply water is not great for seedlings, so going into your body cannot be any better.
So the method to use is to boil water or leave in open container so chlorine will evaporate as a gas naturally from the water, standing overnight thereabouts.
cooking.stackexchange.com/users/55584/remo conan
Is it safe to use rainwater as an ingredient versus tap water - or even cooking things  in it  like pasta?  Would there be any differences in measurements or cooking times - the thought being that there are no chemicals in it versus Tap Water?
Is it safe to cook with rainwater?
cooking.stackexchange.com
<food-safety><water>
cooking.stackexchange.com/questions/6061
cooking.stackexchange.com/users/177/AttilaNYC
Rainwater straight from the sky is probably safe to drink, depending on the collection method and location, but it needs to be collected in safe containers and possibly pH tested for baking and some other purposes. It is safer than stream water, but filtering is still advisable. It is a good idea to filter rainwater and have it tested before consumption. However, it should generally be fine to use in cooking as long as it was collected in a clean container.
You need to filter the water and test it first. It may have bacteria from the collection method. Be aware of pH in baking. It should be fine as long as you are not aware of any immediate pollution. Make sure you collect it in a sanitary container.