Any kind of a nuclear explosion will produce radioactive fallout, some of which will end up carried by the wind over Pakistan and some other neutral countries in the area. The neutron burst will also convert other harmless materials into radioactive isotopes of something else. So basically a lot of the dust kicked up by the shockwave, will come down as radioactive dust, and contaminate a hideously wide area for many years.
I dare say that's not quite the way to win hearts and minds, and that's putting it very mildly.
The comparison to WW2 japan is... misguided and misleading at best too.
For a start, Japan was the surrender of a nation's government, when it became clear that they're definitely not going to win any more. I'm not aware of any such centralized structure in the case of the Taliban and generally islamic fundamentalists.
Even in Japan not everyone wanted to surrender. There was just one group who wanted to surrender, and that was pretty much the Emperor and his gang at the top. Lots of soldiers and officers actually committed suicide because they didn't want to surrender and weren't allowed to fight on, once the Emperor had ordered them otherwise. In the case of the islamists you have exactly such a group which wants to fight on, and no Emperor to tell them to step down. What makes you think it's the same situation?
And even so, many of those who could get into an airplane, went and flew it into the nearest American target, even against the Emperor's orders. (Or, more realistically into an American FLAK barrage.) Are you sure you'd want to cause the same wave of suicide bombers among islamists?
Second, it wasn't the atomic bombs in isolation. Japan was already taking a severe beating, and it was becoming clear for said Japanese leadership that they're simply not going to achieve their goals any more. Japan was already being bombed on its home soil daily, the Americans were getting into amphibious landing range, the Russians were already blitzing through Manchuria, etc. Japan could only delay the inevitable, and only take even more damage in the process. The atomic bombs were just the final proof of how badly they're outgunned and losing.
I don't think we have the fundamentalists backed in that kind of a corner, by any reckoning.
Japan's leadership had everything to lose from actions that sunk the population's morale any lower. The islamists have everything to gain from actions that paint the USA and generally the West even more as bloodthirsty mass-murderers.
Etc.
All things considered, I vote this as the dumbest idea of the decade, easily besting even everything Dubya ever said. Here's your sign.