What would happen if the Earth was hit by a solar flare?
It happens all the time. The Earth is often “hit” by solar flares. Many different things happen. The ionosphere gets excited and short wave radio communications get disturbed. Sometimes satellites get messed up. I suggest you look at the space environment center, NOAA web pages to get more information on this.