Apart from the inherent risk of losing money, it is safe. Of course, you should only play on licensed gambling websites.