Rainwater can be safely used, depending on how it's collected and what type of fish you are keeping. You wouldn't want to collect it as it runs off of your roof for example as it would collect all of the waste from the shingles. Also, if you are keeping African cichlids, which need an alkaline pH to thrive, you wouldn't want to use rainwater because it is generally acidic, what a pH of roughly 5.5 or so depending on your location.