Right before your workout:
Like you said, it's best not to exercise on a full stomach, so you should avoid large meals for about 1.5-2 hours beforehand. This will obviously vary depending on how long it takes you to digest. However, it's also really difficult to work out if you're hungry, so if you need a snack right before you exercise you should choose something gives you energy without filling you up. My personal favorite is a slice of whole grain toast with peanut butter and honey. The honey gives you the boost you need to get started, and then the peanut butter and toast provide a gradual release of energy. The best part about this snack is it packs a lot of energy into not a lot of volume. It does have a considerable amount of calories though, so if you're just doing a light workout it might be best to push through without it, or drop the honey.
Food that will help you get a good workout:
This will largely depend on what kind of exercise you're doing, but in general you should have a healthy mix of complex carbohydrates, protein, fruits, and vegetables. Here is a useful link that gives tips about what to eat in general for fuel, and what to eat during a race (it's targeted towards runners, but could be useful for anyone doing a lot of aerobic exercise). If you scroll down to the bottom you'll see a list of recommended foods, which includes things like nuts, eggs, lean protein (turkey and salmon), whole grains, oranges, and mixed greens. The proportions will vary depending on what kind of exercise you're doing.
After your workout:
Check out this question for a debate on the "window of opportunity" after you work out. It's definitely true that you need replenishing energy sources in order to build muscle and recover - which means a good mix of protein, carbs, and good fats. This site recommends meals like chicken/brown rice/mixed vegetables, omelets with avocados, or protein shakes if you're on the go.
variety
(aka diversification) is a key."Nutrition right before workout"
is different to"Nutrition right before worktout with XYZ restriction"
, it is much easier to answer specific questions -- not to have vague answers. This site is in danger of becoming bloated...