Um... because they can?

A better question would be "Why are there 'Rules Of War'?" The objective of war is to violently force someone to do what you want them to do, and do so with a minimal loss of life. A war is the ultimate state of might makes right - why are some things acceptable and others not? Why do we consider bombing an industrial target different that bombing a residential area? Why is there a difference between a civilian and a soldier? If you're involved in a war, why would you choose to prolong it by not proceeding with a wide-sweeping, all-encompassing attempt at the ultimate destruction of your enemy? Because of the Geneva Convention? Please. If you've got the means to win a war quickly and with the least possible loss of life to you and your allies, you do it. You've already made the decision to wage war, however moronic, which means both killing the enemy and sending the ally to be killed... why should you have any qualms whatsoever about doing whatever is needed to win?

In response to the more general question of why Americans thought it OK to nuke Japan.... almost no American had any idea what a nuclear bomb was, let alone that the U.S. had built one and was going to use it. Nowadays, any mention of nuclear weapons illicits very opinionated responses. The fact that the military can't fart without it being televised on CNN adds to the public scrutiny over the military. In 1945, Americans got their news from the printing press and the radio, both of which you can bet were involved in a very jingoistic presentation of the facts. Asking an American in 1945 how they felt about nuclear weapons was akin to asking that same American how he felt about microwave ovens. And even after the bombing, if you asked the average American, "Are you happy the war is over, even if it meant that 200,000 Japanese civilians were killed or wounded?", I think you'd have received an overwhelming affirmative.

Most historical accounts will explain that Truman bombed Japan because the alternate option - a land invasion - would have cost thousands of American lives and prolonged the war for several more years. Truman made a decision based on the advisement of his war council that bombing Japan would result in a swift crippling of Japanese military forces as well as prove the military omnipotence of the United States, bringing about a quick end to the war.

For the record, the U.S. killed far more civilians during the saturation bombing of Dresden that with the nuking of Japan.