A third-party contractor used hydrogen peroxide to clean the pools. Hydrogen peroxide is a de-chlorination agent, it neutralizes the chlorine which is added to the water to prevent the growth of algae and other micro-organisms.
With the chlorine levels lowered without anybody knowing, algae grew in the water and turned it green and reportedly slightly smelly. Now that the problem has been corrected, the chlorine is killing off the algae, and the pools are slowly returning to normal.
The pool used for synchronized swimming had to be completely drained and re-filled (using water from a training and warm-up pool for water polo, which is no longer needed because after the qualifying phase, the water polo competition was scheduled to move into the big stadium anyway) because neither the athletes nor the judges would have been able to clearly see what goes on under water, which is where most of synchronized swimming happens.