The first bomb was very questionable. Pretty much all of the Axis had surrendered, by then much of Japan's overseas territories were recaptured and they were essentially isolated. Sure, Japan rejected the Potsdam Declaration, but diplomacy is not for the impatient. There's very little doubt that Japan would have surrendered, it was just a matter of when.
The second bomb, to me, is a clear war crime. As a single act of unnecessary violence, it eclipses anything the Nazis ever did. If the Nazis had deployed an attack this heinous, be rest assured everyone involved in the project would have been sentenced to death at Nuremberg. That's how it has always been throughout history - victor's justice. There's no justification for this terrible act of terror against innocent civilians.
Of course, the real reason was to chest thump to the world that the United States was the next great superpower, eclipsing the United Kingdom.
Curiously, they didn't use the atomic bomb on Germany, which had started the whole mess in the first place. Japanese people/race was considered a much more satisfying target.
Ah, that's because Germany surrendered months before the bombs were ready. At the time, Japan was the only target.