How Solar Flares Could Wreak Havoc on Earth