There are no legal restrictions on buying property in Japan for foreigners. Foreigners are only responsible for providing a written notification to the Bank of Japan within 20 days of purchase of real property.
There is no need to have citizenship or even a residence visa to buy a house in Japan. However, buying property in Japan does not entitle the purchaser to receive a Japan residence visa. If you do not have a permanent residence visa, are not married to a Japanese citizen, and/or are not at least resident in Japan with an established work history, it can be exceedingly difficult to find financing to purchase a Japanese property.