I always wonder about this when I watch SF shows. The Heroes land on an alien planet, meet the natives, get invited to dinner and start stuffing food into their faces. Why should the carbohydrates twist the same way as their enzymes? Why should the proteins have the same bases? Why don't they get sick? The only way the Heroes wouldn't die of malnutrition is if God created all the worlds using the same basic DNA template. Assuming life on all worlds started from the same primordial soup random-act-of-bindness, the chances of two worlds having the exact same DNA would be astronomical. Even proteins with the same bases but a right-handed twist would make the stuff unusable as food for us.
In my stories each character's medical records are linked to the food services databases. How else would food synthsizers know what a character can and can't eat? Different body chemestry could mean something that is a coffee sweetener for one alien could be a narcotic for another, and instand death for a third.
If you find me shouting "WHY AREN'T YOU BEING SICK" at an SF show on the telly, it's probably dinner time for them.