US occupation did NOT affect Japan DURING the war, but after it, since the war ended with the occupation of Japan. So, the occupation denied Japan of many soldiers, military facilities etc, rendering it quite useless militarily. Afterwards, the US made immigration to and from Japan easier, enriching both countries. That is what happened in most sectors, technology, science, industry, the American 'way' was introduced, while Japan developed on these principles.
Japan was never officially colonized by any nation. However, after World War II, Japan signed an "unconditional" surrender to MacArthur and the United States army, setting in motion the occupation of Japan for the next few years. During this occupation, though, many things about Japan were changed, including the rewriting of the Japanese constitution.