Cyprus is a member of the EU, so its citizens can play legally in this way. Under EU law, it is possible for foreign-based operators to open up gambling facilities to residents in any member state. In theory, it is not permissible by law to play at a top-ranked online casino in Cyprus, but there is a loophole that many residents use.
Essentially, the only form of online gambling that is allowed in the country is sports betting.
The most recent act relating to online gambling laws in Cyprus was passed in 2012.