As oakroscoe pointed out, you're likely to get different answers from everybody and this one will certainly keep that trend going!
I'm something of a "foodie" and my wife and I look forward to lunch breaks while hiking. We've both also been watching our weight so have been minimizing our bread intake (which means we rarely take sandwiches with us anymore). So we typically carry...
Camelbacks full of water (if we're going to be out more than 8 hours or so, I might carry a steripen as well for refreshing my supply but then, I drink quite a bit of water when doing long hikes).
For snacks, we'll each bring a piece of fruit or two (typically an apple and/or orange, sometimes bananas and/or seedless grapes).
A low-sugar trail mix or mixed nuts (salted for reasons others have mentioned).
Pretty much always bring a Clif bar or equivalent (again, go for the lower sugar ones to even out your energy intake). We each also carry (although rarely drink) one of those 5-hour (or 6 or 7, depending on the brand) energy shots...especially if we're going to have a lot of uphills on the way back.
Lunch itself, believe it or not, is typically a salad with lots of protein and light on the dressing. As a rule, I'll take the previous night's dinner leftovers, mix it up with lettuce, carrots, tomatoes, broccoli, etc. and put it in a ziploc bag. We then carry forks and collapsible bowls and dump the salad in the bowls for eating. If we're putting dressing on the salad, we put that in a separate container and put it on when we're ready to eat (prevents things getting too soggy)). This might not be everybody's choice for lunch on the go but it works for us.
Like others, we may not eat all of that but we've both had the experience of just plain running out of steam before getting back from very long day-hikes so I like to be prepared for some extra energy. In general, you need to know your own preferences, comfort level, limits, etc. I'd say that the general things to remember are:
1. Stay hydrated (sugary and alcoholic drinks dehydrate you...they are not good choices for a day hike).
2. Avoid large amounts of simple-carbs (like sugar) in your food...these will tend to give you energy spikes followed by energy crashes.
3. That much said, a larger-than-usual load of carbs (especially more complex carbs) is probably a good choice...especially if your normal life-style does not involve hiking for 8-12 hours a day!
4. Don't skimp on the protein...good for muscle recovery.
5. Eat enough to keep your energy going but don't overdo it...hiking when you feel stuffed is not (at least for me) a particularly pleasant experience.
Hope this divergent hodge-podge of answers is helping you! Happy Hiking.