How did the US justify its decision to use atomic bombs against Hiroshima and Nagasaki?
It is, perhaps, historically inaccurate to say that the US justified its decision at the time that it was made. At the time, there was almost no controversy over the use of the bomb. Winston Churchill reported, for example, that it was simply assumed that the US would use any weapon that it had to win the war. The idea that the US needed to justify the decision came mainly after the war.
The justification that has typically been given is that the atomic bombs saved lives. If the United States had had to invade the home islands of Japan, the toll in human life would have been horrific. There are estimates that a million Americans would have been killed or wounded. The number of Japanese casualties would have been much higher. Using the bombs to end the war quickly, then, was undoubtedly horrible for the people of the two cities involved. However, it likely saved the lives of many more people than it killed. This is the major justification for the use of the bomb.