The occupying US forces deliberately helped rebuild the Japanese economy. As with the Marshall Plan in Europe, they feared that impoverished and desperate countries might turn to communism, a fear intensified by the communist victory in China in 1949. Japan received $2.4 billion in aid from 1945 to 1953, more than any other country except Britain. The Korean War further increased this emphasis and provided additional resources by making Japan the primary supply depot for all the UN forces involved in the conflict. Although the rest of the economy has largely outgrown it, Japan remained a site for US military spending thereafter, and is such to this day.
There was a post on AskHistorians a few months back that explained it but it was more a side answer so it might be a bit harder to find via the search.
I can give a bried synopsis of it however and it basically came down to a few key factors:
No real standing army to maintain (the American occupation forces were seen as sufficient to keep any would be attackers at bay)
Heavy investment from around the world, particularly the USA in terms of manufacturing. Also many of the companies that were pre-war were still operational, iirc many major Japanese firms i.e. Toyota, Mitsubishi were established pre-1915 which meant that unlike other nations i.e. China that were decimated and had to start from scratch, Japan had a good base to start from.
Japanese innovation is a large part of this as well. When I say innovation however I dont mean Gundams and the like, but rather taking many existing technologies and combining them to make more efficient and effective versions of already existing technology. A good example would be the sony walkman which used many parts from European and American designers to make something new. This boosted investment as Japan looked like a good long term investment choice.
Japan also can be seen as a border nation. It, specifically Okinawa is the first point of contact should an invasion force from the USSR and China attempt an attack. So a large military presence in Japan is very important in the case of a war, so its in the best interests of the USA and her European allies to ensure Japan could get back on her feet quickly and maintain a stable government so that no communist uprisings would be successful (the worse off a people, the more likely they will revolt).
I think thats everything and ill try to find the post in question in the meantime.
EDIT: Heres what i found:
not much but should help somewhat
They had US help, they exploited their remaining colonies, they invested heavily in new technologies & targeted foreign markets with their products.
The last two of which is what made them a manufacturing powerhouse. Within 15 years of VJ they were competing with US and European markets, particularly with cars and motorbikes.
The Japanese have a different work ethic, generally speaking than (say) American workers. The Japanese people understand the benefit of working together for the benefit of the collective. As an example, during the aftermath of the 2011 earthquake and tsunami there was no looting in Japan. As a whole they understand the needs of the many are greater than the needs of the few. Yes, I know that's Star Trek but they are that way. I'm not suggesting they're better people than Americans but they value different things.