Yes, VPNs are legal in most countries around the world, including the US, Canada, and most of Europe. However, you might risk heavy fines or even imprisonment for using a VPN in a country that bans it, for example, North Korea or Iraq.
Poker sites can ban you if they detect that you're using a VPN (even if you just want to protect your online privacy while gambling online), so you need a reliable one to access them. I tested 45+ VPNs to find the best choice for playing online poker.