They had very little to do with the end, really.
Prior to the A-bombs, the Japanese had offered to surrender if they could keep the Emperor. That was turned down in favor of "unconditional" surrender.
The surrender which was accepted after the A-bombs allowed the retention of the Emperor. Identical to the one turned down.
And it was a good thing the Emperor was retained. He, and only he, was able to persuade the troops in China and other far-flung areas to surrender. He sent family members on "tours" to convince the army it was over. Had he been deposed, many of them would have fought to the death, not only theirs but others, too.
