I know that technically the Kaiser abdicated due to factors inside Germany, but Wilson's 14 points made it clear that he would have been forced from the throne anyway if he had chosen not to
Ok two disclaimers: I'm working off of my course work from my degree in Japanese history and on my phone so I can't look up sources, but here goes:
Imperial Japan had developed a virtual cult of the emperor. That's why nobody surrendered until Hirohito's radio broadcast. Because of this worship and his agreement to acquiesce to terms set by the US, it was decided that leaving him as a figurehead would go further toward stabilizing and westernizing Japan, especially with the dangerous military leadership eliminated and US occupation a going concern.
edit: Ok, so I'm home now and I can get you a source. The book Embracing Defeat points out that during the meeting with MacArthur following the surrender, Hirohito expected to be deposed, but MacArthur and the provisional government decided that Japan would be easier to govern if they kept their emperor, who was also a religious leader as much as a dictator. In the end, Prime Minister Tojo and General Matsui took the blame for the emperor and killed themselves, and MacArthur left Hirohito in power, more or less.
Correction: Emperor Wilhelm II did not abdicate. His supposed abdication was announced without him ever agreeing to it. The German Empire was on the verge of bloody revolution, the politicians saw the writing on the wall and decided to save their own fortunes by sacrificing their boss.
I couldn't say whether the allies would have allowed him to stay on the throne as a figurehead, just like the british royals.
The allies learned their lessons from ww1. Their heavy handed actions set the stage for ww2 to happen