It seemed like there should have been more American deaths considering that the Japanese were very well dug in.
Well for starters the Americans usually commanded complete air and naval superiority. Which allowed them to bombard the islands before hand. The Japanese found this out early on and stopped trying to defend the actual landing sites themselves and instead resorted to drawing the Americans deep into the island where they would be counter attacked by the Japanese garrison. This was done on both Okinawa and Iwo Jima, two islands where some of the bloodiest fighting happened. On both Okinawa and Iwo Jima the Japanese allowed the Americans to land and established inland defensive positions where they would be safe from naval and air bombardment.
The Japanese established strong points, like bunkers and trench lines. The idea was that they could hold these lines against the numerically superior Americans, and if they couldn't, well they could at least inflict as many casualties as possible. The Americans developed tactics for taking out these strong points, the most effective strategy being to use flamethrowers to either burn or smoke out entrenched Japanese defenders. The Japanese for their part did what they could, but the Americans had a superiority in every category and were able to receive reinforcements and resupply, a luxury the Japanese didn't have.
It should also be noted that the Americans had the ability to withdraw their men if the fighting became too fierce or they began to lose. The Japanese were unable to do that. The only option for a Japanese soldier defending an island like Okinawa or Iwo Jima, is to die or surrender. Since many Japanese soldiers refused to surrender, their only option was to die fighting; this has the tendency to skew casualty reports.
Source:
A World At Arms Gerhard Weinberg
Japan's Imperial Army by Edward Drea