Yes, drinking water from taps in Japan is safe. For environmental reasons, try to use a refillable water bottle rather than buying bottled water in Japan. Metro train stations have public water fountains, but otherwise these can be hard to find (this is the land of vending machines after all).