Is gambling in a casino permitted?
The Aish Rabbi Replies:
Judaism generally looks disparagingly on gambling. The Talmud says that someone who earns their salary from gambling is invalid to serve as a witness in a Jewish court. Since the person who lost the bet doesn't really pay with a full heart, the winner's earning are considered a form of theft.
According to another opinion in the Talmud, only a professional gambler -- who has no other source of income -- is invalid as a witness. This is because he is not involved in productive activity and contributes nothing to the betterment of society.
Some rabbinical sources allow buying lottery tickets, if the money is for mitzvah purposes, and it is as such not a matter of "losing money" (as with gambling) when the winner is declared. Thus the meager amount given in the beginning to buy the ticket, is given with a full heart for the mitzvah.
(sources: Talmud - Rosh Hashana 22a; Code of Jewish Law - C.M. 92:3, 370:1)