As someone who has quit a job partially over an ethical objection to the product subject matter (it was a surveillance system), I would have no problem at all taking a job at an online casino.
In terms of societal value, I don't see much of a difference between a gambling site and an online stock brokerage or financial trading firm. They're both zero-sum games, where the host takes a cut of the profit. Both can equally lead people to financial ruin, and can be equally addictive. So if you'd work for E-trade or even a hedge fund, why wouldn't you work for PokerStars?
In terms of legality, OP has already specified that it's legal in his/her region, so there should be no moral objection there.
In terms of providing end user value, at least they are providing entertainment value. There are plenty of worse tech jobs where you simply exploit end users and others reap most of the actual product value.
Other commenters have covered the Video Game / tobacco / Facebook angles so I won't go there.
OP, if you managed to find a job offer at one of these gaming companies (you didn't mention that), then congratulations. My understanding is that online gaming industry is quite like the video game industry, where it's tougher than average for an "outsider" to break into the industry.