Sunlight is made up of all the colors of the rainbow: red, orange, yellow, green, blue, and violet. Some of the sunlight is reflected off the surface of the water, reflecting the color of the sky. Some of the sunlight penetrates the water and is scattered by ripples and particles in the water . In deep water, much of the sunlight is scattered by the oxygen in the water, and this scatters more of the blue light.
The Red Sea often looks red because of red algae that live in this sea.
The Black Sea looks almost black because it has a high concentration of hydrogen sulfide (which appears black).
The light that shines down from the sun is called white light but it is actually made up of red, orange, yellow, green, blue, indigo and violet.When white light hits the ocean, the yellow, red and orange colors are absorbed or sucked in by the water. It means those colors disappear. The blue light is only absorbed a little bit, but mostly it reflects back at us. There are also little, tiny particles in the ocean that bounce the blue or green light through the water and right back out of the ocean. So we see blue! Same reason valid for Rivers
Source :http://www.whyzz.com/why-is-the-ocean-blue
I would say that the water acts like mirror. It is transperant and has no colour. Hence when we add sometime or keeps anything inside or outside water, it takes its colour characteristics. Likewise, sky looks blue in the daylight. Hence the colour of ocean or sea is blue. In many places it is blue-green or aqua-green or green.That's due to water plants which lie beneath.
At night, the sky becomes dark. Thus the colour of water becomes black.
Sunlight has VIBGYOR..water absorbs most of the color..but the blue color is least absorbed..hence water emits or reflects the blue light. Hence water appears to eb blue in color. Though water is transparent has no color of its own.
It's simple as the color of ocean and sky are related to each other but the ocean looks blue as other colors like red, orange etc absorbed easily into water and blue being short in light's wavelength, reflects as white light from Sun enters into water, in this case blue returns very easily. And you can take the same for sky also why it appear blue otherwise none has their own colors. This is simple reflection of colors present in sunlight.