The material covering card tables, such as poker tables, roulette tables, craps tables, blackjack tables and so on, is called Baize. It has a smooth surface which allows cards to slide across the table with ease.
The same material, Baize, has been used to cover snooker tables since the very beginning because it’s texture caused friction, which slowed the balls down. Back “in the day” it was dyed green to resemble a lawn.
And to answer the question why card tables are green, John Scarne says in his book “Guide to Gambling”: card games used to be played illegally in rooms with legal pool tables. Game layouts were drawn with chalk on the green felt of the tables and could then be rubbed away if the cops showed up. Out of tradition, the color was transferred when permanent gaming tables were build.
Although you can find card tables in a wide variety of colors today, from blue, orange, red, to purple and others, green is still the most common.
I guess the world of gambling has some sentimental traditions as well.