Answer: tens of thousands of years ago.
Step-by-step explanation:
The Sun makes energy by nuclear fusion which is a process by which hydrogen atoms are fused to form helium atoms.
It does this in the core and the process releases a lot of energy that takes quite a long time to get to the surface from said core.
Scientists say that the energy takes between 10,000 and 170,000 years for the energy to escape the core to the surface where it is then radiated to Earth as light.