The speed of light is less through dense materials. Since the sun is so dense it takes a photon of light around 30 million years to travel from the core to the surface. From the surface of the sun, a photon of light takes eight minutes to reach Earth.