As a result of WWII, Germany lost territory, and was under military occupation and government, before self-government was restored. Germans were tried for war crimes, and many found guilty, and some executed.
Germany lost 25% of its territory.
German self-government returned in 1949, with the establishment of the Bundesrepublik Deutschland (West Germany, Federal Republic of Germany) and the Deutsche Demokratische Republik (East Germany, German Democratic Republic).
Approximately 5,000 Germans were convicted of war crimes, and about 500 executed, by the Western Allies (Britain, France, USA).
As for Japan,
The Japanese Empire lost 80% of its pre-1937 territory (mostly colonial possessions), including about 1/3 of its population. This doesn't include the loss of Manchukuo, which was nominally an independent state. If this was included, it would be a loss of 88% of territory and over 50% of the population.
Japan was under rule by the occupation government until 1949 (officially until 1952, but most authority was returned to Japan in 1949).
Japan renounced war, and constitutionally prohibited the use of force or the threat of force in international diplomacy.
About 1000 Japanese were executed for war crimes.
Simply from these facts, it would seem that Japan was indeed not punished to the same extent as Germany, but instead to a greater extent.
However, some things did proceed quite differently. Nazi rule in Germany permeated government quite thoroughly, and the end of the war and de-Nazification left Germany without an effective government, and military rule by the occupation authorities took over. In Japan, while the armed forces had strong influence over the government (e.g., they could bring down a government by refusing to nominate Army and Navy ministers, preventing the formation of a cabinet), the Japanese government was a civilian government, and still functioned at the end of the war. De-militarisation in Japan left the government largely intact, and the Japanese government continued to run the country, under the supreme authority of the occupation military government.
Soviet looting of Soviet-occupied Germany was extensive, and the Soviet occupation was, especially initially, brutal. The DDR was a Soviet satellite state, rather than a fully autonomous nation. Soviet repression and oppression in East Germany should not be viewed simply as a punishment for WWII - it was also simply a result of being a victim of Soviet imperialism. Consider, for example, the case of Poland, one of the Allies, and one whose forces fought alongside both the Western Allies and the Soviet Union to the end of the war, despite the occupation of Poland. They suffered under Soviet occupation and as a Soviet satellite, too, despite having been of the Allies.
There are many who believe that Japan wasn't punished enough, that too many criminals avoided punishment, and that the Japanese government should "properly" apologise for its wartime crimes, and compensate the victims. Partly, this is a result of the lack of Nazis to blame for Japan's war - in Germany, the Nazis could be blamed, and people could think that they were anti-Nazi (some certainly were anti-Nazi, but anti-Nazism probably grew in people's memories). More on this in https://www.reddit.com/r/AskHistorians/comments/kvv7w3/why_does_russia_and_japan_get_a_pass_for/