Green, black, red, or grey?
Green: perfectly healthy algae, get an oto cat or 5
Black: the dreaded BBA, check your CO2 and up your circulation in the dead spots where this algae will grow
Red: your fish couldn't be alive as this is a marine flagellite outbreak, not possible in a FW tank.
Grey: fungus or dead green beard algae, the lack of light may have killed it off, manually remove with a toothbrush to prevent further algae outbreaks, or introduce a few snails.
Most likely it was fungus or Green beard algae. Fungus is bad, do a water change and vac it out. Green Beard Algae is expected in well maintained planted tanks. If you really don't want it, add more plants to out compete it and check your current plants for leeching.
And all algae can break out as fast as 30 minutes, and infest a tank as fast as 4 hours, maybe faster.
Keep in mind cyanobacter is not algae.