There is a tradition of playing of cards (Jua) or gambling during Diwali in many regions by several communities. Playing of cards and gambling are seen as an attempt to know the luck during the coming year. Diwali also marks the end of a financial year and beginning of the next financial year in some regions. So people test their luck by playing cards or using other gambling methods.
Legend also has it that Lord Shiva and Goddess Parvati used to play the cards. There are several incidents mentioned in the Puranas of Lord Shiva and Goddess Parvati playing cards.
Playing of cards by betting money is a bad precedent and should be discouraged. Stories from scriptures are taken out of context to defend such bad habits. Gambling should never be encouraged and it is a very bad habit.
Playing cards for fun by family members and friends during festivals does not cause much damage. But parents and elders should always advice youngsters not to play cards with money or gamble.