I can't find the link right now, but have read a fairly convincing argument that it was the conventional type of bombing, not nuclear, that caused the Japanese to surrender. Still a terrible thing for Japanese civilians though.
I think it would be wrong to characterise that as the consensus, though. My understanding is that historians haven't come to a conclusive assessment, but that the majority view is that it did cut the war short and save lives (net).