You are asking about problems we all have with our waterers. Simplest solution is to change the water daily. Standing water will result in these problems. I keep a nylon scrubbie of some sort by the waterers, and scrub anything that feels slimy from them, before I refil. I have well water, so I also add either ACV, or a drop or two of bleach.
Organic apple cider vinegar is a simple way to limit problems. It is good for the chickens, but also helps prevent algae growth.
We have this idea that our water is clean and fresh, whatever its source. This is just not true, whether it is city or well. You will not be able to stop the green and red algae, or whatever they are, from growing back. The water needs to be changed daily, a least.