Have you ever wondered what would happen if a nuclear bomb was detonated in outer space? So did scientists. In 1962, a test was conducted above the atmosphere over the Pacific Ocean, code-named "Starfish Prime". Other than sounding like the worst Transformer ever, it was an experiment to see what would happen if a 1.45 megaton nuclear bomb were to detonate in space above the Earth. The explosion could be seen from Hawaii and New Zealand.
So what happened? Well, it disrupted electrical circuits and streetlights in Hawaii. It also mixed with oxygen in the atmosphere, and took many years to right itself. IF it were to happen today, there is no doubt that satellites would be disabled and the Internet would go down, perhaps around the world, and cellphones would lose signal.
In the time since the experiment was conducted, treaties have been signed to assure that such an experiment is never conducted again.
Here is a recently declassified video about the test.