Political and economic reasons: During the period of the development of the atomic bomb, the Allied troops were planning to launch a combined offensive against the Empire of Japan.
The Soviet Union sought control in the governance of Korea and Manchuria in exchange for entering the war against Japan after the defeat of Germany. When President Truman heard about the successful testing of the atomic bomb, he was involved in a discussion with the Soviets in Potsdam. The American politicians realized that this new weapon significantly changed the equation when going to war against Japan. They realized that they can put an end to this war by using the weapon even before the Soviets could launch an offensive on Japan from Korea and Manchuria. Truman showed his distrust in the Soviets by keeping this test a secret at the meeting. Also, the devastation that the bomb would cause would show the Soviets that they could not safely challenge the American leadership after the war had ended. On the economic front, the war had revived the American economy from a depression. But prolonging the war would again have a negative effect on the economy.
The American leadership wanted to put an end to the war swiftly and regain its economic interests in the Pacific islands and boost their own economy. Another reason was the actual use of the bomb itself. American scientists, led by Oppenheimer, had done a great job in building the bomb but all the calculations about its use and destructive power were done on a test site. A successful deployment of the bomb would prove to the world that it was for real and give the American military supreme confidence in further advancement of this technology.