The light that entered into the ice would have been traveling slower for a very brief period (ice is denser than air), and it is now out of sync with the other ray of light. If the two rays are close enough together, they will interfere with each other, and white light will be transformed into a single color. Some wavelengths might be in sync and get amplified, while others are diminished through destructive interference. The same thing happens with sound waves and water waves, but neither is quite as magical as light waves.
The thickness of the bubble (and thereby the thickness of the surrounding ice) can remain static and display the same color for a much longer period than in soap bubbles. When the growth variables change, the thickness of the bubble will often change, and this creates a different interference pattern and a new color.
Not all snowflakes are colorful, but I seek them out whenever they are falling. Typically we receive two or three snowfalls in Central Ontario that offer up these vibrant gems each winter.
These colors are only seen when using reflected light, so the light source has to be coming from the same direction as the camera. This poses a huge challenge when you need to find the perfect angle of light to bounce off the surface of the snowflake. If the crystal were perfectly parallel to the focal plane of the camera, you would need to have light emitted from inside the lens to reflect in the right direction. Since this is not possible, each snowflake needs to be photographed at an angle.