The energy released in the Sun's core takes a long time - over 100,000 years - to reach the Sun's surface, the photosphere. Once it gets there though, the energy can escape literally at the speed of light - as electromagnetic radiation.
The visible light from the Sun is radiated from the photosphere. In solar terms it's a cool place - only around 6,000 °C.
Put your cursor over the picture below to see the temperature of the Sun in different places.
Not all the energy from the Sun goes from the photosphere straight out into space. Some of it is absorbed by the chromosphere and some transferred to the corona.