As with water, this color is caused by the absorption of both red and yellow light (leaving light at the blue end of the visible light spectrum). The absorption spectrum of ice is similar to that of water, except that hydrogen bonding causes all peaks to shift to lower energy - making the color greener. This effect is augmented by scattering within snow, which causes the light to travel an indirect path, providing more opportunity for absorption.
From the surface, snow and ice present a uniformly white face. This is because almost all of the visible light striking the snow or ice surface is reflected back, without any preference for a single color within the visible spectrum.
The situation is different for light that is not reflected, but penetrates or is transmitted into the snow. As this light travels into the snow or ice, the ice grains scatter a large amount of light. If the light is to travel over any distance it must survive many such scattering events. In other words, it must keep scattering and not be absorbed. We usually see the light coming back from the near surface layers (less than 1 cm) after it has been scattered or bounced off other snow grains only a few times, and it still appears white.
In simplest of terms, think of the ice or snow layer as a filter. If it is only a centimeter thick, all the light makes it through; if it is a meter thick, mostly blue light makes it through. This is similar to the way coffee often appears light when poured, but much darker when it is in a cup.