The Role of Magnetic Helicity in Solar Flares