Some things have been said that I must disagree with and some things to which I agree completely.
My opinion is that, the usage of atomic weapon was not an effort to end the war quickly, but a demonstration of power for other possible enemy. If you get my meanings.
Andrey is rising a very important point here. It is quite likely that the atomic bombs were just as much (or possibly more) of a demonstration of power towards the Soviet Union as they were to beat the already defeated Japan into final submission.
It is questionable whether the most important argument for the use of the nuclear bomb, namely achieving a Japanese surrender without the need for "Operation Downfall" (the allied invasion of Japan which was to consist of two major landings codenamed "Operation Olympic" and "Operation Comet") to be launched, can really be upheld. One thing that is often overlooked is that Japan's ability to offer resistance was pretty much crushed in August 1945 and it is absolutely certain that by the time that the nuclear bombs were dropped there was no longer the tiniest chance of any of the Axis powers (Japan being the only one left) to develop any kind of nuclear weapon to threaten the allies. Allied bombers had laid havoc to most Japanese towns which proved even more inflammable than many towns in Germany. More than 100 000 (more that is than as an immediate result of the bombs of Hiroshima) people died in just one bombing raid at Tokyo. We tend to think of the Japanese as a "different" kind of humans who would have fought to the death of the last one of them without any regard for their own lives. We are still strongly under the impression of Japanese propaganda photos showing their citizens training to repel an invasion with bamboo spears and most of us are thoroughly convinced that the kamikaze pilots (many of whom were NO volunteers) stood for the fighting spirit of all of Japan.
However, the Japanese are the same humans as we are and many of them knew that the war was lost which brought many of them to the conclusion that the unconditional surrender should be considered. There was of course an influential clique of war hawks around people like the prime minister Hideki Tōjō and war minister Seishirō Itagaki who had a very vital interest in prolonging the war (both were tried for crimes of war and hanged in 1948), but the movement against the continuation of the war was growing ever stronger already simply because the war couldn't possibly be continued anymore. Much of Japans industry was destroyed, the supply with goods from territories still held by Japan was impossible (with the US and the Royal Navy in total control of the sea), fuel was running out and food too grow sparse. The example of the German "Volkssturm" had shown that citizens with bamboo spears or even bazookas could not repel a military invasion and though we may cling to the belief in Japanese believing in their own invincibility we are offending the intelligence of most Japanese if indeed we assume that they really believed in their ability to withstand an invasion.
I'm quite sure that with a little more patience and a little more effort the Japanese surrender could have been achieved without invasion and without the nuclear bombs. Human lives are a very weak argument in times of war though and the wish for a demonstration of power to the Soviet Union (perhaps to prevent a continuation of the war in Europe with Stalin rather than Hitler as the enemy) must not be underestimated.
After the dropping of the nuclear bomb on Hiroshima no sufficient time was given to the Japanese government to react before the next bomb was dropped on Nagasaki. I cannot help but feel that the wish to test that second kind of nuclear bomb before it was "too late" (before the war was over that is) did play an important role in the rapid succession of the two nuclear strikes. On behalf of those who made the decisions one must mention that there was no real knowledge of the late effects of the bombs. As late as in the 1950 soldiers were positioned close to the ground zeros of nuclear testing because of lacking awareness of (or the cynical wish to "test") the damage done by the radiation. Without those long-term effects (of which people died decades after the end of the war) the effect of a nuclear bomb would be no more horrible than that of carpet bombing such as those that had been launched against Tokyo and most other towns in Japan.
There is something more I must ask with regard to the argument that the bomb had to be used because if it hadn't been the US somebody else would have used it. I already mentioned that Japan had no longer the possibility to develop any nuclear weapon (and they had been less into nuclear research than Germany), so the argument probably holds only for developing but not for the using of the nuclear bomb. But what I am wondering about is whether you think that because others might use it the bomb should be used today. If tomorrow Ahmadinejad announced that he had the nuclear weapon, would that be a cause for you to use the same on Iran? Should Saddam Hussein's "WMDs" been a cause to use WMDs on him? In short, does the evil of another justify the own evil?