As described in the August 1997 issue of Scientific American these seem to be discharges of currents of charged particles from the tops of large thunderstorm clouds. Above these clouds is the ionosphere so the sprites represent electromagnetically-accelerated currents between the voltage potential that developes between the upper atmosphere and cloud tops. The particular mechanism which allows some sprites to be accelerated to millons of electron volts so that the can be seen by the Compton Gamma Ray Observatory, is not at all understood. You can learn a lot more about them at the University of Alaska website.
All answers are provided by Dr. Sten Odenwald (Raytheon STX)
NASA IMAGE/POETRY Education and Public Outreach program.