The energy of the Sun is produced in its core where nuclear fusion transforms hydrogen to helium. Energy is released as light and neutrinos. From the core photons carry energy though the radiation zone up to about three quarters of the solar radius from the center. From this point energy is carried up to the surface by convection. At the bottom of the convection zone the material is heated by the radiation. The hot material rises upward in to the solar surface, the photosphere where the light escapes.