According to Dr. Sisterson at the Argonne National Laboratory, the answer was thought to be the top of the troposphere. That's about 12 miles up. But after some dramatic discoveries in the last 10 years, that answer has been revised. You can thank sprites, elves, and blue jets for that. Each is linked to extremely powerful storms.
Sprites are the most common.
Sprites are barely visible to the naked eye. They sometimes look bluish closest to the clouds, but extend red, wispy flashes upward. Some occur as high as 60 miles above the storm. On images from weather satellites and space shuttles, sprites appear as marvelously complex shapes. No one knows how long the three phenomena have been around.