It seems to me that it would be hard to say "we killed a bunch of innocent people" and end up looking like the good guy. Especially when we just liberated tons of innocent people from the Nazis.
Almost all of the arguments in favor of the atomic bombings used after the fact (which is when people began to think about how to "justify" it in an active way) argued that unless the bombs were used, something worse would happen. Such as: a large land invasion that will kill more people than the bombings. Or: the world would not understand the danger of nuclear weapons and a World War III would become more likely. Both of these rely on imagining a different timeline in which different (negative) results would happen. Of course there are other possible timelines one can imagine (e.g., the Soviets declare war on Japan, the US demonstrates the bomb without using it on a city, and Japan possibly surrenders then). There is no real way to know whether one approach or the other would have been better, or if the use of the bombs was truly the way to minimize loss of life. It is also historically unclear whether the bombs were actually the primary motivation for the Japanese surrender.
In terms of the motivations of those who ordered the use of the atomic bombs, they had multiple motivations. The general assumption was that if you made such weapons, you would use them to aid the war — this could be believed even if you did not think that one or two would end the war by themselves (the people planning for their use believed many would be necessary, and were surprised when the war appeared to be ended by only two of them). There were also some (notably James Byrnes, the Secretary of State) who thought that their use would also be useful in showing the Soviet Union that the US was not to be messed with — a different kind of motivation. And there were those who believed, as noted before, that it might cause the war to end with less bloodshed, and might be important to the postwar.
There were a few who made arguments against the use of the bombs but their arguments were similarly speculative (and not framed in terms of the immorality of mass slaughter of civilians), and were not discussed at the highest levels in any event (they were about how the use of the bombs on cities might turn world opinion against the USA).
Ultimately it is also just worth noting that the US planners were not really sure how many people would die from the bombings and how much of a difficulty it might be to justify them. They appear to have made no formal estimates ahead of time of their detailed effects on their targets. The reports of Japanese casualties that came through on August 8th, 1945, were sufficiently disturbing that the US propaganda bureaus were encouraged to run stories about how many lives would be save, that Hiroshima was a valid "military" target, and so on. Which is just to point out that the need to "justify" it at all assumes that you think it's problematic, which the relatively small circle of those in on the decisions to use the bombs didn't really assume until after their use.
There is more that one can say but Hasegawa's Racing the Enemy is a very good all-around book on the bombings of Hiroshima and Nagasaki and the end of the war, and the variety of motivations people had.
There’s always more to say on the subject, but u/restricteddata has discussed justifications for the atomic bombings before, for instance, here, but I’d also recommend checking out the answers in the atomic bomb section of the FAQ.