As water conservation awareness leads to more people storing rainwater, I've heard more concerns voiced over the safety of rainwater on veggies than usual. Here's the short answer: RAINWATER IS AN AMAZING RESOURCE! We should absolutely be growing food with it. Your veggies will grow better on rainwater than any other water!
However, there are some things to be aware of. The concerns largely stem from two different things coming from the same place: the roof.
is the roofing material toxic
is there bacteria washing off the roof
The concerns are valid, however after some research it's been shown that the concern is minimal, and as always with water harvesting it's VERY important to use some best practices that aren't often touted by your local handyman or your made expressly clear by your local water agency.
#1. Roofing material toxicity is not high enough to cause a problem for your veggies. Wood shingles are the most toxic. The other materials don't really register even as high as drinking water.
#2. Bacteria is usually present in rainwater. There are many ways to offset contamination potential.
Divert the first flush of rainwater from your rainwater collection. This will be the first few gallons of water that flushes off your roof after it hasn't been raining. It will include bird poop, pollen, dust, etc. This water can go right out to your landscape, but without getting stored, the bacteria will easily be managed by organisms in the soil. A first flush device is easy to make.
Don't store water in a barrel, get a tank! The higher volume of water you have, the less likely it will be to stagnate and allow for bacteria growth.
Apply water directly to the soil around your plants rather than spraying it on to the edible parts of the plants
Don't water the plants on the day you are going to harvest
Wash your veggies