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.
Credit: NASA's Goddard Space Flight Center
![](https://i.ytimg.com/vi/gCl6P1Y2_tI/mqdefault.jpg)