No. NO NO NO. The bombs were not necessary. No matter what anyone tells you, they weren't. The bombs weren't even dropped on Japan to end the war. They were dropped on Japan to threaten the Soviets.
Japan was on it's final legs. USA had already invaded and was in control of some Japanese territory. The only reason they didn't surrender when Germany did was out of vain pride. They didn't want to lose face. But they were close to surrendering.
At the time Japan was suffering from poverty. They were almost entirely reliant on food being imported from their China colonies. A naval blockade between Japan and mainland Asia would have stopped food going in and Japan would have been forced to surrender with relatively little bloodshed.
Nothing justifies the use of the atomic bombs on Japan, except perhaps the fact it prevented the Cold War from escalating into a full blown conflict. It was done to intimidate any future enemies America might have had. This is proven by the dropping of the second bomb three days after the first one. How can this act be justified? The first bomb, maybe, if we ignore what I've already said, but the second one? Not at all. Three days is not long enough of a time to expect a country to surrender in any war, ever, after an individual attack. Dropping the second bomb was simply an action to tell other countries, "Yes, that massive damage we did on Japan. We can do that again, we have more than one bomb." Or why didn't they drop the bomb into the ocean? To show Japan they meant business? Nothing justifies America's actions.
EDIT: I personally believe Japan's surrender (conditional, of course) was only months away. Japan knew they couldn't win. They had known for about a year they couldn't win. The only reason they hadn't surrendered, was out of pride.