It wasn't a proposal. More like a joke, by someone who is noted for saying things like this in jest.
When scientists pointed out that it wouldn't work, wouldn't produce anything like enough energy to make a difference, he then said that he meant detonating millions of fusion bombs above the poles of Mars once every second to create two mini suns. A far future science fiction idea.
See also my Why Nukes Can't Terraform Mars - Pack Less Punch Than A Comet Collision
Oh, and using nuclear explosions in space - I think that it might be made an exception if it was for peaceful purposes. Though I'm not sure what the procedure would be. For instance if the only way to deflect a large meteorite was to use nuclear weapons, surely some common agreement could be reached to waive the Outer Space Treaty for just that one mission?
The treaty says "States Parties to the Treaty undertake not to place in orbit around the Earth any objects carrying nuclear weapons or any other kinds of weapons of mass destruction,install such weapons on celestial bodies, or station such weapons in outer space in any other manner".
Could they come to an agreement that nuclear bombs though they are weapons in normal use, in this case the intent which would be globally agreed on means they are no longer weapons in the sense of the treaty but mechanisms for deflecting meteorites - or whatever it is they are used for?
Obviously that would need a lot of thought and discussion, and I've no idea what the lawyers would say. But in common law whether something is a weapon depends on the intent. For instance a stick could be a weapon, or something to support you as you walk, depending on your intent. You could prevent this being used later as justification for nuclear weapons in space by requiring that there is agreement that it is not a weapon by some significant majority of the UN or whatever first before it can be used. Just a thought. It would be interesting to hear what an expert in international law and space law would say about it.