Sometimes I have nausea when drinking beer, especially after a good meal. This is not always the case and not for other alcohols. Why does it happen?

Reflux. The stomach has to empty to accept the larger volume of an alcoholic beverage of a lower proof of beer. If by "good meal", you mean large, or full of protein or fat, then the more fat or protein in a meal the longer the stomach takes before it empties. The post meal apertif by nature is small in volume for a reason.
Hard to say. But you may have some kind of allergy to one of the ingredients used in beer, like the malt or hops. How much beer are we talking about? If you are drinking excessively, the alcohol in beer can itself cause stomach irritation and nausea, but this would likely occur with other forms of alcohol as well. If you are truly drinking socially, and this is important to you, try different brands and see.