The Color of the Sea
Stand on a beach or look at a photo of the open ocean and one color dominates: blue. The sea stretches to the horizon in shades of deep blue, and it is one of the most recognizable colors in nature. A common assumption is that the sea is simply reflecting the blue sky above. That is part of the story at the surface, but it is not the main reason. The deeper, truer answer lies in how water itself treats light.
Sunlight and Its Colors
The starting point is sunlight. Although it looks white, sunlight is a blend of all the colors of the rainbow, each one a different wavelength of light. Red light has long wavelengths, while blue light has short wavelengths. When sunlight shines into the sea, the water does not treat all these colors the same way. Some colors are absorbed by the water, soaked up and removed, while others are able to travel deeper and survive.
Water Absorbs Red Light
The key fact is that water absorbs the long-wavelength colors, especially red, orange, and yellow, far more strongly than it absorbs blue. As sunlight passes down through the sea, the red end of the spectrum is quickly soaked up and disappears within the first several meters. Blue light, with its short wavelength, is absorbed much less, so it can travel much deeper into the water. Water molecules also tend to scatter blue light around. With the red removed and blue remaining and scattered, blue is the color that is left for our eyes to see.
Why the Sea Changes Color
This explains why the open, deep ocean appears such a rich blue. But the sea is not always blue everywhere, and that fits the same idea. Near coastlines, the water often looks green or brown. This happens because the water there contains other things, such as tiny floating plant-like organisms called algae, or sediment and silt stirred up from the bottom and washed in by rivers. These materials absorb and reflect light differently, shifting the water's color away from pure blue. So the sea's color is really a record of what the water contains and how it handles light.
Source
This article was written using information from Wikipedia.