Nikolae,
We already have exploded a nuke in space.
http://www.youtube.com/watch?v=RKvvrNrCOnw
Never said we have never detonated a Nuke in space.
A nukes damage potential in space is severely hampered by the fact that a majority of the damage that a nuke does comes from heat and shockwave. Shockwaves are impossible without air, and heat is limited to instant thermal radiation from the initial reaction.
Also, those nukes weren't in "space" they were in atmosphere tests a..k.a high altitude, which is why they still contained blast waves.
Other reasons include, lack of ability to track debris, cost benefits, energy vs size of target, etc etc etc,