Solar flares produce gamma rays by several processes, one of which is illustrated here. The energy released in a solar flare rapidly accelerates charged particles. When a high-energy proton strikes matter in the sun’s atmosphere and visible surface, the result may be a short-lived particle – a pion – that emits gamma rays when it decays.