Robert Hanson has provided the [my edits included] information below:
An EMP caused by an atomic blast is a higher-frequency pulse, and can cause problems with individual pieces of equipment. If we are hit with an EMP attack, we have plenty of other things to worry about. If you want to protect items, it is easy to shield them with a Faraday Cage
On the other hand:
A large CME [which emanates from the sun] is a low-frequency event. To have an impact on anything, it requires a long "antenna." Our power lines are the perfect antenna for receiving the energy. The big issue is that this can destroy the large transformers. There are no spares of these, and it takes years to get a new one built. There is precedent for concern. In 1859, a large CME caused power surges in telegraph wires strong enough to start fires in the stations. Known as the Carrington Event, it caused minor damage because we really had no electric infrastructure.
Then there is this, Lloyds of London has a good report on the potential impact of a CME to the United States. See Solar Storm Risk to the North American Electrical Grid. If you read the executive summary and the conclusions, you will have the gist of the report. Ugly! Really ugly if it is a bad one. One to two years without power in some areas of the nation. Can you go one to two years without electricity? You might not have a choice.