The legality of playing online casino games for real money varies from one jurisdiction to another. Even within the same nation, different states and territories can have different gambling laws.
It is also worth mentioning that in some jurisdictions, the person playing online casino for real money isn’t the one breaking the law – it is only the one who accepts the wagers that is.
Some jurisdictions have special laws regarding online gambling, while other jurisdictions are using their ordinary gambling laws to regulate any type of gambling. When the legal framework for gambling is older than the advent of online gambling, it can be difficult for legal experts to agree on how to interpret the law in regards to online gambling.
It is always important to research the laws pertaining to your specific situation.
Even if you find that online casino play is legal for you as a player, it can still be risky to have money deposited with a casino operator that is violating the laws of your jurisdiction or any other jurisdiction, because the authorities of such a jurisdiction might manage to seize the domain (making it impossible for you to log in and access your funds) or freeze the bank accounts of the casino operator pending further investigation, including accounts where player funds are being held.