The Japanese had decades of atrocities under their belt by the closing of world war II. There was the Bataan Death March, Siam, occupation of Manchuria, invasion of Singapore, Guam, Philippines, attack on Pearl harbor, and many many other Acts of War that the empire of Japan engaged in. Unlike others mentioned, unit 731 and the rape of Nanjing. They were utterly ruthless.
Hell, there was that one Japanese imperial soldier who was still murdering foreigners like 30 years after the war freaking ended!
So to say that Japan didn't deserve having atomic bombs dropped on it I believe is disingenuous. The people of Japan supported the war and were very militant, unlike the Japanese of today. They believe that they could conquer all of Asia and they try their hardest to do so. They were also prepared to fight to the death to defend their home island. During the preparation and bombing of Japan, the Russians were also preparing in amphibious invasion of Japan. This would have split the Japanese islands into Russian and American administered Islands, like what happened to Germany in the post-war.
The two nuclear bombs dropped on Japan killed roughly 150,000 people. That is less people than died at the siege of Stalingrad in Russia. That is less people than died in a few weeks at the Battle of the Somme during world War I.
The fact is that War sucks, and it's not just the soldiers who suffer and die - it's the civilians as well. We should never forget that, and that there's one thing that the Japanese will tell you today is that we should avoid war at all cost. Whether you agree with that or not, is for you to decide.