Most sommeliers have a "participation" in the wine they sell. The deals work differently in any given restaurant, but the base salary itself isn't all that much - maybe $10-15 an hour. But then there are tips and commissions.
Some sommeliers simply get whatever percentage of the total bill's tips that comprise their wine's sliver of the total. Let's say they sommelier at a nice restaurant (almost by definition: McD's doesnt even have a burgermeister). So in a typical evening, maybe they can turn 20 tables and each table on average orders one bottle of wine with an average ticket of $70. That's $1,400 in sales; a commission of 20% might be paid (or $280 total); maybe the sommelier takes home half of that number (the waiter and others all take their little pieces).
Other restaurants will have a baseline - and the sommelier gets a larger percentage on sales above those levels. Specifically, a restaurant might have been averaging $40,000 a month in wine sales; the sommelier gets just minimum wage(ish) up to that level - but then on every dollar above that in a month, she gets, say, 20%. So if the sommelier can sell another $40,000 of wine, that's 8 grand in her pocket. For the restaurant, which basically doubles the price they pay for the wine when they present it on the menu, it's easy money and a no-brainer financial transaction.