The debate on whether to bomb the Japanese was ultimately decided by the fact that this bombing would result in less casualties/deaths than a full on invasion by the Allied powers.
After the Allied powers defeated the Germans in the European theatre, they turned their focus to Japan and the Pacific theatre. Ultimately the Allied powers wanted a quick way to end this war as all countries involved suffered heavy losses. In order to get Japan to surrender, the Allied powers needed a significant attack. A land invasion, like the one they used in Normandy France would have caused millions of casualties on both sides.
However, using an atomic bomb would result in a quicker surrended and less casualties for the Allied powers. These two factors influenced America's decision to drop the atomic bomb on Japan.