Need you ask that question? Really?
Before you read on, ask yourself: Was Japan, after years of war and other adversities, really a threat to anyone?
It is a known fact it was wrong and unnecessary. In fact, I'm astonished with the current poll results (65.7% say "No"). Maybe it is because the large majority of people in the Escapist is from the U.S. (and I will not get into how good the government can be good at maintaining population-wise ignorance, it happens in my country too, so I'm well aware of it), maybe it can be due to the demographics involved, I dare not say.
Japan had no conditions of continuing the war: it was stranded, left with no allies, no commerce, and they knew that. Their surrender was imminent and perfectly achievable without the bombs.
If you played "Metal Gear Solid 3" then you know what "deterrence" means. If you didn't, I quote the Wikipedia:
"Deterrence is a strategy by which governments threaten an immense retaliation if attacked, such that aggressors are deterred if they do not wish to suffer great damage as a result of an aggressive action. Weapons of mass destruction (WMDs), conventional weapons strength, economic sanctions, or any combination of these can be used as deterrents.
Mutually Assured Destruction (MAD) is a form of this strategy, which came to prominence during the Cold War when it was used by the US to characterize relations between the United States and Soviet Union. Both nations were prepared to fight a full scale nuclear and conventional war, but were not willing to risk the carnage of a full scale nuclear war."
I could go on a little further, but I'll jump straight to the conclusion: the U.S. needed to portray their intentions as the new world leader. The bombing was how serious the government was on showing their intent.
On a side note: if you didn't know, during the testing of nuclear warhead technology, the U.S. came very goddamn close to ending the world. They decided to deploy a warhead BELOW the ocean, which almost initiated the chain reaction for hydrogen isotopes to F*CKING FUSE. (To start a nuclear fusion, you need the magnitude of energy that is released in a nuclear fission). Of course, they never did that kind of deployment again, and made sure that it wasn't as discussed as it should have been by the public.
I recommend the documentary "Trinity and Beyond" to those who really don't have the slightest notion of what is a nuclear bomb. Still is a remote notion, but a notion nonetheless. And I warn those who look it up: it can be VERY F*CKING SCARY.