These criticisms are either ill-informed given the evidence that existed at the time, or willingly ignore the lack of a suitable alternative course of action.
The horrors of the atomic bomb, no matter its target, are manifest.
However, there were many other factors which played into President Harry Truman's decision to use this weapon of mass destruction.
As a historian of sorts whose college thesis nearly became a doctoral thesis (before law school interfered), I did the original research needed to offer this compelling competing viewpoint. Here are some inconvenient facts:
First: Japan remained in the war despite the surrender of its European theater allies of convenience, Italy and Nazi Germany, in April 1945.
Second: There was concern in both the European and Pacific theaters that the Soviet Union would try to permanently occupy any and all territories which its military controlled. Hence the race in Germany to reach Berlin. And thus the United States sought to proactively end the war with Japan instead of, say, bleeding them through a protracted air war and bombing the cities into utter ruin (which course of action might have produced even greater civilian casualties).
Third: The Japanese had earned a reputation for particular fierce and brutal fighting. The mentality which bred the kamikaze pilot was also expected to infuse its infantry. Indeed, such ferocity was encountered by American troops as they engaged in their successful, yet arduous, campaign of "island hopping" in the Pacific as they closed in on the mainland. There was no reason not to expect the same type of last ditch intense defense of the Japanese homeland if and when an invasion was launched. Furthermore, military intelligence reported that the Japanese had implemented a complex civil defense system. The result was the expectation that American soldiers would encounter hand to hand, street by street combat throughout Japan, and likely sustain significant casualties along with civilian casualties.
Fourth: Sustained air bombings of the mainland in 1945 did not induce surrender and supported the belief that an invasion would be needed to end the war. As explained above, an invasion was believed necessary but also was not preferred.
One must understand these factors in order to see how the decision to use the atomic bomb could be made for humanitarian purposes with a legitimate strategic objective of ending the war as quickly as possible, minimizing civilian and military casualties to both sides and maximizing the chance of preventing a Soviet invasion and later subjugation of the Japanese home islands.