Can explosions work in space?

May be worth mentioning that a nuclear explosion is actually likely to be heard if you are close enough, which could be tens to hundreds of miles. The pulse of radiated heat impinging on the outer surface of the spacecraft (or the spacesuit if you are unlucky enough to be outside) will cause some ablation of the surface causing the surface to receive a shock. If you are quite far this will sound like a faint click but closer it could be a loud bang.

This effect has been heard in nuclear tests here on earth were a relatively faint sound is heard at the instant the bomb goes off, long before the actual sound of the blast arrives (because of course the heat wave travels at the speed of light).
In space the effect would be much more pronounced because the release of energy is experienced directly rather than through the indirect heating of the air around the explosion which subsequently releases that heat at a much slower rate.  The heat pulse would therefore be much sharper and higher in peak amplitude resulting in some degree of ablation even at much further distances.