Algae aren't just unsightly, they influence water chemistry. Sometimes, algae can improve water chemistry in the short term. However, in most cases the presence of algae either lowers water quality or is a direct result of poor water quality. An adjustment is necessary in either case.
Like higher plants, algae use photosynthesis to turn carbon dioxide and nitrogen compounds to produce sugar and oxygen. In a well-lit aquarium, algae give off more oxygen than they use. Since carbon dioxide is acidic, it lowers pH. So by absorbing carbon dioxide, aquarium plants raise pH and make water more alkaline, or basic. However, in the absence of light, algae respire like animals do and release carbon dioxide, lowering the pH of aquarium water.
In addition to carbon dioxide, algae influence the levels of nitrogen compounds in aquarium water. Algae absorb ammonia, nitrite and nitrate. These chemical are toxic. Additionally, they are typically associated with low pH, so algae raise pH by absorbing these compounds. However, algae tend to bloom when these compounds are present and die back once they've absorbed them. When algae die back, water chemistry is negatively influenced.
Saltwater aquariums have a special type of algae called coralline algae. Coralline algae incorporate calcium into their cell walls, hardening it to protect the algae from herbivorous fish. Since calcium buffers water pH, removing calcium from the water column decreases pH, making the water more acidic. At the same time, many marine organisms, including coral and crustaceans depend on calcium in the water to build their structural component. Aquariums with coralline algae -- and other calcium-dependent organisms -- often need supplemental calcium to make up for the calcium absorbed from the water.
While algae can affect water chemistry, the reverse also holds. Thick algae growth, or cloudy green water, is usually a sign that something's gone wrong in the aquarium. Typically this means that the tank either has too much light or has excessive levels of nitrogen compounds like ammonia. If direct sunlight falls on your aquarium, block it. If you have trouble turning your aquarium lights on and off, you can use an electronic timer to make sure the tank gets only eight hours of light a day. To avoid excessive nitrogen waste, keep up on your monthly water changes and avoid overfeeding or overstocking the aquarium.