Sunlight travels at the speed of light. Photons emitted from the surface of the Sun need to travel across the vacuum of space to reach our eyes.
The sun’s light takes about 8 minutes and 20 seconds to reach the Earth after it has been emitted from the sun’s surface.
Here’s the math: We orbit the Sun at a distance of about 150 million km. Light travels at about 300,000 kilometers/second. Divide these and you get 500 seconds, or 8 minutes and 20 seconds. This is an average number. Remember, the Earth follows an elliptical orbit around the Sun, so the distance between them slightly changes.
This means that if the sun were to suddenly extinguish (not that this could actually happen), we would know it 8 minutes and 20 seconds later!