Water reflects and scatters the light that strikes it; this is shown by the fact that you can see your reflection in puddles. When the sky is brilliant blue, the sea is also, because it reflects the blue of the sky.
However, it is not completely due to the colour of the sky as even if the sky is overcast, the sea is still a bit blue. It is due to the fact that blue light is more easily bent, or refracted, than red light; thus, light refracted back from the surface of the sea appears blue. Furthermore, when you are underwater the water around you appears blue because more blue light is scattered back to your eye than red light.