Personally, I believe that using the deadliest weapon ever created by a man played a crucial role in crushing the Japanese morale and battle spirit. At the end of World War II, the Japanese society was heavily militarized and fanatically devoted to serving Emperor Hirohito, who was viewed as a living god by his subjects. Therefore, the entire country of Japan lived by the warrior code of bushido, ready to fight for the defense of their mainland. Despite this fatalistic readiness for a final fight, the Japanese were not ready for experiencing the terror of nuclear warfare. The tragic events at Hiroshima and Nagasaki forced the Japanese nation to abandon their will to fight to death, causing the Japanese government to agree with the American terms of surrender.
Second of all, I believe that the bombings actually helped save tens of thousands of lives from both sides of the conflict by helping the US military to bypass the need for a massive invasion of the Japanese mainland. Before the completion of the Manhattan Project, the military planned to mount an invasion from the newly-captured islands of Iwo Jima and Okinawa. Considering the scale of the defensive preparations conducted by the Japanese government leads to me to believe that a conventional invasion of Japan would result in a massive number of American casualties. The operation of this magnitude would also be extremely harmful for the civilian population of Japan. These reasons make me believe that the unfortunate eradication of the two Japanese cities was a lesser evil.
Finally the atomic bombings provided the United States with an opportunity to establish its position as a new superpower, demonstrating its military might to the prospective rival superpower of the USSR. Even though demonstrating the capabilities of a weapon of such destructive power on the civilian population is definitely immoral, it was the best way to showcase the atomic bomb, which eventually became an important asset in keeping the Soviet aggression in check. By using nuclear weapons in combat, the US managed to get an upper hand in an early arms race with the Soviet Union and maintain that position until the testing of the first Soviet nuclear bomb in 1949.
In conclusion, I would like to say that, even though the bombing raids on Hiroshima and Nagasaki resulted in tens of thousands of civilian deaths, they were instrumental in overcoming the stubborn resistance of the Japanese government, bringing the war to an end, and saving a far greater number of lives in other Japanese cities. Beyond all doubt, these events are tragic, but they should not be perceived as a horrible and unnecessary atrocity.