i prefer to exercise on empty or almost empty (sometimes i have a banana an hour before). I read somewhere once that if you exercise with food in your tummy, all you burn is the food but if you exercise on empty (or almost) you force your body to use its reserves.
Totally depends on you. Most of the time, I'll need a greek yogurt, almonds, or something in my stomach to get an effective workout. This morning, I didn't feel like eating, and my workout was just as good as always, until the end, when I started feeling a little shaky. I ate as soon as I got back from the gym, and I feel perfectly fine now. Like sontaikle said, you'll have to experiment with what works for you personally.
I like to eat before I work out, but nothing too heavy. If I'll be running I try to time it about an hour in advance too. I find if I eat too close to a run then I start to get side stitches while I'm running.
As you can see it depends on the person. When I don't eat first, I find I am lower energy or get hungry to the point of distraction, so it tends to cut my workout time short. But we've all kind of learned what works best individually by trying different things.
I usually leave a light snack in my gym bag too just in case I feel like I need a little pick me up, like a 100 calorie bag of almonds or a piece of fruit. Usually I just need it if I plan on being at the gym for a while, like sometimes I'll add a yoga class after some cardio, so having a little snack in between keeps me from getting hungry and distracted.