JThere is only one official language spoken in Japan, which is of course Japanese. However, many Japanese are able to understand English to a certain extent since English is the foreign language that everyone must learn as part of compulsory education.
Even if you don't understand Japanese, you can still certainly enjoy Japan. But if you know a few everyday Japanese phrases then it will make your trip even more memorable. A few words make a big difference.