Turns out there's no harm in munching before a workout, as long as it provides you just enough energy to achieve your your fitness goals. You need calories, and if you're not well-fueled, you're not going to work out as hard. It's the same reason why Olympic athletes are so famous for downing so many high-calorie foods.
Our bodies use energy during a workout. When we exert ourselves, we burn
glycogen -- the cache of glucose we keep stored in our muscle and liver
cells. After we've gone through that store of carbohydrates, we can
start to feel fatigued. The body can store about 2,000 calories in
glycogen, and going past that amount can lead to symptoms like feeling
light-headed, weakness or just plain exhaustion.
This is especially true for those planning an endurance training session. But even if you aren't trying to run an ultramarathon, eating beforehand is still a good idea especially if it's a particularly rigorous session lasting 90 minutes or longer.
If it's something moderate like a 30 minute treadmill session, then just stay hydrated. While plain water is fine for a half-hour run, any workout over an hour that involves sweating will require some electrolyte replacement (sports drink, a piece of fruit, etc).