In the beginning of the movie he's flabby, overworked, and has tooth decay (Hanks apparently gained about 50 pounds for the role, a la Robert DeNiro in Raging Bull). This is the state he's in when he floats up to the island after a plane crash. (Same director as Flight by the way.)
Then the film stencils Seven Years Later across the screen, and Tom Hanks has been transformed: he's solid, bleached, lean, and standing in the tropical shallows with a homemade spear.
The implications are obvious: he was forced into a self-imposed Cast Away Diet. The pounds were shed living off the land and subsisting on, presumably, shell-fish, fish, fruit, and coconuts. Possibly some root vegetables were thrown in there. So he got plenty of lean protein; fish fats (Omega 3s), coconut fat (lauric acid is a "healthy saturated fat"); vitamin C and other important nutrients.
The Cast Away Diet is actually superior to the Mediterranean Diet, which relies too heavily on grains (a filler-food at best and fat-making and toxic at worst, as in gluten, lectin, and other anti-nutrients). The Cast Away Diet doesn't demonize any of the macronutrients; it just gets good amounts of all three. it might be better than the Paleo Diet, given the recent dust-up over red meat.
The reliance on seafood and not animal-muscle meat removes some of the squeamishness some people considering Paleo have toward red meat.
The Cast Away Diet is far more nutritious than vegetarian or vegan diets, with the healthy fats and rich amino acids from fish, and the absence of grains. A cast away would probably also hunt seabirds and eat small reptiles, so you can add fowl and game to the mix.
This diet is not difficult to replicate for the average eater, more or less permanently cast away on the shores of one of our large cities, who gets to know one of the innumerable fish stores. I'm basically eating a Cast Away Diet this month, with lots of shrimp, scallops, lobster tails, arctic char, fruits, salads, a bit of chicken, etc. Now all I need is a volleyball. Wilson!!