There is a good deal that can be said about diet for during hiking and in day-to-day recovery. Here are some basic concepts.
All calories are fuel, some happen to be better quality than others (fruits vegetables) and some you should try to avoid all together (trans fats). Chris Carmichale’s Food for Fitness is a good read as well as the Paleo Diet. Many other performance guides like training for climbing also have good chapters on eating for performance.
A well balanced diet getting plenty of fruits and vegetables (at least 5 servings a day) the right amount of proteins, while indulging in the bad stuff less often is a good strategy for overall health. The cleaner your body processes the fuel the more it will translate into powering your body. The basic proven rule is that if you consume more calories that what you burn your body will eventually convert them to fat and vice versa.
While on the trail a 60/40 blend of carbohydrates and proteins is ideal. This is fairly easy to find in many home made oatmeal cookies, nut rich nutrition and granola bars. Activities of mid to high exertion that extend past an hour will require the muscle glycogen stores to be replenished.
This in most cases means eating 100 – 250 calories an hour. The body won’t be able to process more than this an that amount will prevent bonking. Before a long hike plan on eating plenty of good carbs two days before to make sure the muscle glycogen stores are primed and ready to go. Don’t eat an excessive amount right before activity to avoid feeling bloated. Your body will need oxygen rich blood to fuel legs, a blood shunt to the stomach processing a big meal will be counter productive. When you get off the trail have some good carbs and protein to consume in aiding recovery, bananas with potassium, peanut butter, chocolate milk are popular choices.