It's absolutely NOT all right to have a two-year-old sipping wine and beer, and I would encourage your friends to stop this practice. It provides absolutely no benefit to the child and it can be quite harmful.
While a few small sips of wine may not seem like much for a 170 lb. adult, that amount can have significant effects in a 28 lb. two-year-old. It would probably take only two ounces (about seven child-sized mouthfuls) to reach a blood-alcohol level that exceeds the legal limit for driving!
While a two-year-old isn't going to drive, he could get drunk very easily from that kind of sipping.
The Physical Dangers
Alcohol has very specific effects on the body that can be particularly harmful to a child. It causes the blood sugar to fall to levels that can cause irritability, confusion, and even seizures. It lowers the body temperature, and since children's bodies have such a large surface area relative to their weight, they lose heat rapidly and can become hypothermic very easily.
Additionally, alcohol has very direct effects on the brain. Since most of a person's brain growth occurs during the first few years of life, repeated exposure to alcohol could interfere with brain growth and cause delayed development and lowered intelligence.
Alcohol Tolerance
Probably the worst effect of this practice is that the child is becoming accustomed to and tolerant of alcohol. Two years of age is a prime time for children to have accidental overdoses, because they're curious and don't know enough to stop themselves from taking something that's dangerous. A two-year-old, left alone for even a minute or two, could drink large amounts of alcohol out of someone's glass.
What prevents most children from having a significant accidental alcohol poisoning is that when they first taste alcohol it's unpleasant, so they don't continue to take more than a mouthful. A two-year-old who likes the taste of alcohol would have nothing to limit him from drinking more, and alcohol overdoses can be fatal in children.
While I am also aware that in some cultures children are offered wine, those children are usually at least 8 to 10 years old, and the amount given to them is very small relative to their weight. Though I would prefer not to give alcohol to children of any age, at least this practice has less potential to cause harm than giving it to a two-year-old.