There are usually several contributing factors for the occurrence of an event.  I think it's useful to try to step into the shoes and mindset of the Americans.  The Japanese had developed new tactics at Iwo Jima and Okinawa resulting in massive American casualties.  The prospect of actually invading Kyushu and Honshu looked like it would take the deaths of at least hundreds of thousands of Americans plus untold numbers of wounded.  The Japanese wanted to inflict such casualties so that they could obtain a conditional surrender on favorable terms.
 
The America people were war weary, and would not sustain another two years of all out war.  The Japanese just would not surrender because the country was in the grips of the militarists.  Japanese cities had been firebombed, unrestricted submarine warfare had stopped trade...and still the Japanese would not surrender unless the militarists were left in power.
 
It was this scenario that led to the dropping of the bomb called Little Boy on Hiroshima on August 6, 1945.  On August 8, 1945 the Red Army invaded Manchuria and swept up the remains of the Kwantung Army.  America made the political decision to drop Fat Man on Nagasaki.  It was the Soviet entry into the war plus  the two atomic bombings that led to the decision by Japan to surrender on August 15, 1945.
 
I don't think the Japanese truly comprehended the ramifications of the use of atomic weapons, but they did see the destruction.  Imo it was the use of these weapons coupled with the prospect of a Soviet occupation of the main Japanese Islands that led to the Japanese decision to accept the Potsdam Declaration unconditionally.