There are three basic types of stinky smelly water:
Rotten Egg Smell:This is from a gas called Hydrogen Sulfide and is the result of an anaerobic substrate. When there is too much decaying organic material in the substrate, oxygen is depleted and the rotting material creates Hydrogen sulfide gas. This often happens more quickly if you are using sand or a fine gravel that compacts tightly cutting off oxygen. This can be fixed by using a larger grade sand or gravel, vacuming the substrate, and removing decaying plants leaves immediately.
Ammonia smell: This basically means your aquarium has not completed the nitrogen cycle properly, or the cycle was interrupted due to a bio load overload for your biological filtration, or something has wiped out your nitrogenous bacteria colony. Introduce more nitrogenous bacteria and increase biological filtration capacity. If the aquarium is newly set up, allow 60 to 90 days for the tank to fully cycle before adding any more fish and do not over feed the current fish population.
Musty dirty smell: This is often from allowing algae to build up in the aquarium and not enough circulation. Heavy surface aeration may drive the smells of the aquarium across the room that may otherwise dissipate. Cleaning the aquarium more often, increasing water changes and adding more circulation should help.
Green water is free floating algae. Often happens while the tank is unstable- particularly during the nitrogen cycle or the first 90 days of a new aquarium. The main causes are:
High organic particulate matter in the water column resulting from over- crowding, over feeding, dead decaying fish or other animals, too many decaying plant leaves, backed up-clogged filtration system, stirred up substrate, leeching substrate.
Intense lighting and too long of a light period. Lights should not be kept on for more than 8 to 10 hours a day, and unless you are growing plants there is no need for intensive lighting.
High ammonia or nitrate levels
20% to 40% water change, gravel vacuuming, and the removal of any obvious food source.