There is no denying that what you put in your mouth will have an effect on your weight and your health.
I found some of the points in this article rather insightful:
It's a common scenario. A slightly overweight person decides to start exercising. She diligently visits the gym and performs her exercises to near exhaustion. After three weeks, she's shocked to step on the scale and find she's gained a pound. Unfortunately, many people unconsciously increase their food intake in the belief that they're burning it off through exercise. While exercise does burn calories and boost the metabolism slightly, the effect isn't dramatic enough to compensate for that extra cream filled doughnut eaten as a reward for exercise.
The way to overcome this common food mistake is to have a healthy eating plan and stick with it. Plan your splurges carefully and keep them within reason. It's fine to reward yourself for exercising but don't always make food the reward.
Keep reading: Common Food Mistakes that Keep You from Losing Weight