In addition to being a fairly common theme in a number of television and Hollywood shows is the potential threat of the electromagnetic pulse (EMP). In sufficient strength, an EMP has the capability of effectively destroying electronic instrumentation by overloading the circuits with too much current.
An EMP is simply a short burst of energy in the form of photons. A photon itself is a generic term for light at different wavelengths. In essence, a radio wave, television VHF or UHF, cell phone signals, visible light, x-rays and even gamma rays are identical in all ways except their wavelength. Equivalently one could say they only differ in frequency as wavelength and frequency are interdependent here in that all photons with a given wavelength have the same frequency. Photons with shorter wavelengths have more energy per photon than photons with longer wavelengths. The bottom line being that from infrared and radio waves all the way up to gamma rays, these are all simply different energy photons. The EMP’s which tend to be of concern to electronic equipment are the lower energy type such as radio waves. Radio waves typically are too few in number to be of any threat to electronics but if you increase their number substantially, they can have sufficient power to start overloading some circuitry.
An EMP is generated by all burst electric phenomenon from the familiar experience of the simple shock on your finger after walking across a carpet and touching a doorknob to a full blown lightning strike. Each of these generate an EMP but for an EMP to destroy electronic circuitry, it must induce large currents in the same. Sparks and lightning bolts generally do not create enough radio wave photons to damage any electronics at a distance. These tend to only damage electrical equipment if they have their current running directly through that same equipment rather than an EMP. A nuclear weapon however does have the potential to generate a sufficiently large EMP to cause widespread damage in electronic equipment. Technically an EMP type effect can also be created by a solar flare and these have historically been known to knock out electrical distribution systems in the north. A close by lightning strike can have similar effects very close to the bolt as well.
It is not the actual direct nuclear process which creates an EMP in a nuclear blast, it is the huge burst of gamma rays created in a nuclear detonation which later generates the EMP. A nuclear detonation really has very little electrical activity going on at all in the traditional sense. What actually takes place is the generation of large quantities of gamma rays from all the fissioning nuclei which have their protons and neutrons dropping down through many different energy levels giving off the difference in energy as gamma rays. It is these gamma rays which ultimately generate the huge EMP from a nuclear weapon.
The gamma rays travel out from the nuclear blast at the speed of light. They were for the most part all generated within a microsecond and so they form this thin shell of dense high energy photons racing away from the explosion. These gamma rays effectively only interact with the electrons orbiting the air atoms through which the gamma rays travel. When these gamma rays interact with the air in this way, they knock off the bound orbital electrons and send them largely off in the same direction as the incident gamma rays. This expanding shell of gamma rays then creates and expanding shell of electrons which serves as a form of electrical current. These electrons also interact with the earths magnetic field causing them to turn somewhat but the key result is the electromagentic field created by this large distribution of electrons is the EMP resulting from the nuclear explosion.
An EMP can be shielded and many circuits are already sufficiently robust to not need additional shielding (such as a common flashlight or household wiring protected by circuit breakers). A metal cage can be enough in many cases but the more intricate and sensitive an electronic device is, the more at risk it would tend to be (such as cell phones and almost anything highly dependent on computer chips).
I would not personally recommend hardening instrumentation against an EMP any more than I would recommend installing fallout shelters. Either could be useful or not, it is largely a simple matter of personal choice.