The main narrative is that dropping the atomic bombs in Hiroshima on August 6th 1945, and Nagasaki three days later, made Japan surrender on September 2nd, and therefore put an end to World War 2. Those who defend dropping the bombs usually express the following arguments:
•The power of the atomic bombs impressed so much the Japanese that they finally accepted the unconditional surrender terms that the Allies had proposed at the Potsdam Conference, in July 1945. By taking this decision, the President of the US, the Democrat Harry Truman, saved millions of lives, both civilians and soldiers, that would have perished in an alternative long full-scale invasion of Japan. Indeed, historical documents show that the war-fanaticism of the Japanese and the devotion towards their Emperor, made them ready to fight in suicide missions to defend all their islands.
•Before Hiroshima and Nagasaki, the US had already annihilated all major cities of Japan, which caused much more casualties than the atomic bombs. For example, starting in November 1944 until August 1945, Tokyo was quasi destroyed by air raids causing around 150,000 deaths. Similar numbers were found for the big cities of Osaka, Yokohama, Nagoya and Toyama. This was more compared to the 80,000 and 30,000 direct deaths in Hiroshima and Nagasaki, respectively.
Moreover, the US Air Force had warned in advance the civilian population of those cities to evacuate, and for Nagasaki the leaflets dropped to the population stated that the US would use a second nuclear bomb.
•It was necessary to attack 'untouched' Japanese cities with atomic bombs to demonstrate the real power of this new weapon.
Basically, according to this perspective, it was morally acceptable to drop the bombs because it saved more lives than continuing the war with conventional means.
However, there is another position inside the main narrative. Anti-war people argue that Japan was on the verge to surrender and therefore the use of atomic bombs was unnecessary and morally reprehensible. But this perspective is also flawed:
It is true that Japan was losing the war and its main ally, Nazi Germany, was completely defeated. But the leaders of Japan did not have on their plans to accept unconditional surrender, as this would mean the removal of their Emperor, who is a divine figure for the Japanese, the occupation of the country by US forces, having trials for war crimes, and losing their colonies.
The military plan of Japanese leaders consisted of holding some months more, and settling a peace deal with the mediation of the then neutral USSR, after the Americans would fail to invade the main islands of the country. Certainly, Japanese propaganda had already prepared the civilians for more devastating bombings, so the atomic ones did not alter too much the situation for avoiding a complete capitulation.
No, the atomic bombs were not the main cause of the surrender. It was the entry of the Soviet Union into the war in the Pacific the 8th of August 1945 that provoked it:
•The Supreme Council of Japan was the highest executive body that ruled the country. And all the six members met officially for the first time since war started to discuss unconditional surrender on August 9th at 7 a.m, four hours before the second atomic bomb was launched in Nagasaki.
•On August 8th, Foreign Minister Togo Shigenori went to Premier Suzuki Kantaro and asked that the Supreme Council should meet to discuss the bombing of Hiroshima, but the members declined as "it was not so important", as many other Japanese cities had already suffered more destruction during that summer. Also, Japan had a nuclear program as well, and their leaders knew about what a nuclear bomb could destroy.
•On the summer of 1945, it was clear for Japanese elites that they could no longer win the war, and by then, Japan could only achieve its main goal, avoiding unconditional surrender, as long as the Soviet Union was kept out from the Pacific front. The Japanese hoped that Stalin would be interested in the US not getting a total victory in order to contain American influence in the Far East. That was part of the calculation among the members of the Supreme Council to continue the war.
•The Soviet declaration of war on the 8th of August changed all the equation of how much time Japan could endure. The best troops had been moved to the south-east of Japan to fight the expected US invasion. When Soviet forces attacked Japan from the north-west, they faced little opposition and were ready to take the main islands of Japan in 10 days, according to military reports.
From the US side, it is also possible to argue that even without the entrance of the USSR into the Pacific front, dropping the atomic bombs was not necessary to win the war and save the lifes of many soldiers. Indeed, it is not realistic to pretend to stop technological progress in nuclear physics. But, the US could have organized a test with assistants from all the world, including Japan, about how these bombs worked and their power of destruction. It would have been a clear act of dissuasion to persuade everyone to stop the war, and regulate these new weapons. By that, the US would not only have been able to avoid dropping the atomic bombs, but also limit the crazy nuclear arms race that followed during the Cold War.
The reason why the main narrative says it was the atomic bombs in Hiroshima and Nagasaki that forced Japanese leaders to surrender is because it was convenient for both Japan and the US:
Japanese elites and the Emperor could blame losing the war on "an extraordinary weapon that nobody could have prevented", and not because of their bad strategic decisions. It also helped portray Japan as a victim and wash their atrocities in China and South-East Asia.
As for the US, it helped sending the message to the world that it was their scientific progress that made ending the war possible, and a good justification for all the money spent on the atomic program.