Water molecules absorb longer wavelengths (red, orange, yellow) more strongly than shorter wavelengths (blue, violet). Sunlight penetrating the ocean loses its red/orange components within meters. The remaining blue/violet light is scattered in all directions by water molecules—Rayleigh scattering, the same phenomenon that makes the sky blue.
Violet light scatters even more than blue, but: (1) solar output peaks in blue-green; (2) human eyes are less sensitive to violet; (3) some violet is absorbed. Our perception combines the dominant scattered blue with residual green, creating the characteristic blue hues.
While the sky's reflection contributes at glancing angles, the ocean's intrinsic color comes from water's molecular absorption spectrum—observable even in indoor pools or laboratory columns of pure water.