I see two common errors when people eat on workout days. One occurs with fat loss, the other with muscle gain.
Goal: Fat loss
On days when you train, don't eat any extra to make up for training.
Often I'll hear clients say they eat extra on training days because they don't want to "waste" the workout. Or, they'll say they eat extra to "maximize" the workout. That's well and good when you are trying to gain, but with fat loss, I find it's easier not to adjust. It's applying good information (that there is value in eating to maximize a workout's benefits) in a way that's counter to your goal (using more energy than you take in, through diet and exercise.)
First, part of the goal with fat loss is getting the body to use up some of its energy stores (aka, fat.) So if you work enough to use 20% more energy today and then add in 20% more energy through food, you're really just eating to maintain. You want the extra deficit.
Second, habit and routine plays a big part in steady, sustainable fat loss. Having two routines - a workout day routine and a non-workout day routine - is tougher than having one. It's much easier to build one habit at a time. So build an eating pattern that works towards your goal and sustain that day after day. Eating is homework - if you don't do it, you won't benefit as much from your efforts in the gym. Just don't adjust the amount based on the gym. Adjust it based on your results - if it's working, keep it up. If it's not, move the amount up or down and observe the results.
Goal: Muscle Gain
On days when you train, definitely eat more. But if you're having trouble putting on muscle, it's probably your off days that are doing you in. If you squat heavy and then eat heavy, then have a light day and eat light, you're eating to maintain, not gain. You want to eat more overall.
The comment about habit, above, still applies. You're better off eating one habitual way that leads to your goals than trying to build in multiple eating habits at once.
This doesn't mean workout nutrition doesn't play a role. If you're in the gym for 60-90 minutes and you're eating a light meal before and your next meal some 30-90 minutes after, you might be eating less overall than a non-workout day. You might be missing a chance to eat - instead of a hearty breakfast and a big lunch and a snack you're eating light, sipping some water at the gym, and then eating a big lunch . . . for less overall calories. That on a day where you absolutely don't want to eat less food. A solid workout shake and post-workout shake can fill in the calories you're not getting because you spent that time training, not eating. Make sure you aren't eating less on days you train.
The second issue is under-eating on off days. A lot of lean guys who want to become big guys make this mistake - eat heavy, then eat light, then eat heavy, etc. and get stuck. They'll hit the AYCE place and fill up, then skip breakfast and have a light lunch the next day. Eating is homework, get it done.
Short version: Don't eat at cross purposes to your goal.