While the legalities of online casinos will depend on what country you are in, Qiwi is perfectly legal to use as a deposit option at online gambling sites.