Whether you can wear white in Japan depends on the occasion. In general, it's best to be aware of the cultural context.
According to the provided reference, you should generally avoid wearing white at a wedding in Japan. However, wearing black might be acceptable at a more casual wedding. Bright colors and patterns are welcome at weddings as it is a celebration, but anything too flamboyant should be avoided.