There really weren't good alternatives that wouldn't end up with millions more dead in the long run.
But the other fact that's normally overlooked by that who opposed Hiroshima and Nagasaki is the fact it very likely prevented future use of atomic and nuclear weapons. Pandora was out of the box and even the design team didn't know how bad it was going to be. But I believe the use in WWII caused every world leader for the next 80 years and counting pause for thought in their use.
The fact is killed civilians was horrible, but the other fact (ignored by those who oppose the use) that's ignored is that warfare of the time didn't take civilian deaths into account and didn't care about them. We've gotten better as time had gone on, but neither side worried about "civilian deaths" as a part of the equation back then. It was just something that was accepted even though we know it's morally wrong now.