There are in fact many foods astronauts are not allowed to eat. I'll be specifically talking about the ISS as they are the only ones currently in space.
Bread: Astronauts are not allowed to eat bread because their crumbs can go into machine and equipment, and into astronauts' eyes.
Alcohol: Russians were allowed to drink small quantities of alcohol (such as on the Mir) but NASA has prohibited this on the ISS; for obvious reasons. You don't want a drunk person in a confined pressurized vehicle 400 km above the Earth. Also because alcohol affects muscle protein synthesis (and muscles get even weaker in micro gravity) and similar to soda, many alcoholic beverages are carbonated and can cause discomfort and eructation (burps).
Salt and Pepper: Again similar to bread, salt and pepper can go into their eyes and damage equipment. Salt and Pepper are served on the ISS by being dissolved into liquids. However salt and pepper in their raw form are not allowed on the ISS.
Soda: Here on earth, the Carbon Dioxide bubbles will just pop and turn into gas, however in micro gravity, the bubbles remain in the liquid and this can cause digestive tract problems such as discomfort and fetid burps.
Food on the ISS has to follow these six categories:
- Tasty (although their sense of taste is reduced in micro gravity)
- Sticky or wet (to avoid crumbs or loose parts getting into equipment)
- Processed and pasteurized because food has to remain edible for the length of the entire mission
Because of this, many perishable foods and drinks such as fresh milk and hydrated vegetables are not allowed on space missions. If a food can follow these 6 categories, it is allowed in space (ISS specifically). If it doesn't follow even one of these categories, then it's not allowed in space.