As mentioned by AbbeysDad, as long as you have clean rainwater that is collected, it is fine. If you live in a city or country where sprays are used, then you can get adjustable fittings for the down pipes on your roof. They allow the first lot of rain to wash off onto the lawn or wherever and after 10-15 minutes of rain, they redirect the flow and send it to the rainwater tank.
Rainwater has no minerals in and will need some sort of mineral salt to increase the general hardness if you want to keep most fish. A cichlid Rift Lake Conditioner is suitable for this purpose. Pure water (like rainwater) has no minerals in it and there is nothing to stabilise the pH. This means the pH can drop rapidly and to very low levels. Adding a small amount of mineral salts like a Rift Lake Conditioner, will provide some necessary minerals to stop the pH dropping suddenly.
You do not need to add dechlorinator to clean rainwater because it does not have chlorine or chloramine in it. Chlorine/ chloramine is added to mains/ tap water by the government to kill bacteria that might make us sick. Rainwater should theoretically be clean and free of bacteria as long as the collection/ holding tank is clean and free of contaminants.
Rainwater held in approved tanks will last for months or even years as long as things don't drop into it and contaminate it. The most common items that get into rainwater tanks are dust, leaves, insects, small lizards, birds and small mammals. Having a screen on top of the tank will prevent these things from getting in and polluting the water.
Algae does not usually grow in rainwater tanks but if normal green algae does grow in the tank, then it means there are some nutrients in the water. However, normal green algae is harmless to people and fish and in fact is a plant so is beneficial as long as it is clean. Algae can actually help improve the water by filtering out nutrients. I am not suggesting you try to grow algae in the rainwater tank, but if normal algae (not blue green algae) grows in the rainwater tank, it will not harm the fish.
To use rainwater, simply put some in a fish only bucket and aerate it for 30 minutes and then use it in the tank. If you have livebearers and fish that need harder water then add Rift Lake Conditioner at 1/3 to 1/2 dose and aerate for 24 hours before adding it to the tank.