It's common knowledge for most people to brush after meals; however, to keep your teeth at their healthiest, it is far better to brush your teeth before eating rather than after.
Anytime you eat or drink anything that is sugary, the bacteria in your mouth feed on these sugars to make acids. These bacterial acids cause the pH in your mouth to drop below normal levels and make your tooth enamel "softer" and more vulnerable to abrasion. For most people the pH at which your tooth enamel begins to demineralize is about pH ~5.5. The process of bringing your oral pH back to normal is far from immediate and typically takes about 30 minutes, so you should not rely on your saliva alone to reverse these drops in pH. To the right, I embedded a chart of what your oral pH looks like after meals.
The big danger of brushing during this time period after meals is that you'll end up scrubbing away layers of your enamel with your toothbrush, which is never good. Additionally, when you drink or eat things that are already acidic and have lots of sugar your teeth are at an even greater risk. Also don't forget that you should always use a low abrasive toothpaste.
Although you can always wait 30 minutes after meals to start brushing or re-balance your oral pH quickly with an alkaline mouth rinse, it is most effective to brush before eating or drinking since you can remove as many bacteria as possible before "feeding" them (an exception is brushing before bedtime, which you definitely should do). Reducing the total number of bacteria in your mouth that can produce acid before you eat will limit how acidic your oral pH becomes and reduce the total damage bacteria can do to your teeth as well. Some studies have shown that, in areas of the mouth where bacteria may not have been brushed away for a few days, the pH can remain acidic for several hours so keeping your teeth clean is very important.
If you can't stand the taste of toothpaste when you eat just wet your toothbrush and brush without toothpaste. You really only need toothpaste for it's fluoride content anyway; you can just as effectively clean your teeth with just the bristles.