Algae are microscopic single cell plants. Whilst not directly harmful, they are undesirable in swimming pools as they discolour the water, usually green, which is most univiting to the swimmer. Eventually the water can become opaque and dangerous in that a bather in difficulty may not be seen. The pools floors will also become slippery if algae are attached to it.
As they are plants, they thrive in the same conditions. They require Nitrogen, Phosphorus and Potassium, the same the plants in your garden. They also like sunlight as it is essential for photosynthesis. This is where chlorophyll, which causes the green colour, utilises light energy and converts carbon dioxide into organic compounds essential for growth and gives out oxygen.
Nitrogen is most likely introduced into the water by bather contamination. Shock treatment, itself a good method of killing algae ensures that some nitrogen is released as a gas rather than staying in the water as an assortment of nitrogen compounds.
Phosphorus is introduced into the water in a variety of ways :
1) In the water supply where small amounts are introduced into the water by the supply company to prevent corrosion.
2) From water softener additions, such as sodium hexametaphosphate
3) From scale control chemicals, containing phosphonates
4) From cleaners containing phosphoric acid
5) From accidentally introducing garden fertilisers into the water from surface run off or sprays. This will give you Nitrogen and Potassium too!
So to prevent your from going green this season make sure to keep your pool topped up with algaecide and shock on a regular basis.