A solar flare occurs when magnetic energy that has built up in the solar atmosphere is suddenly released. Radiation is emitted across virtually the entire electromagnetic spectrum, from radio waves at the long wavelength end, through optical emission to x-rays and gamma rays at the short wavelength end. Very large solar prominence taken from Skylab in UV light. The energy output from the core of the sun is in the form of gammy rays. These are transformed into visible and IR light by the time they reach the surface.