Yes, VPNs are legal. However, it depends on what you use it for.  For example, if you are downloading and sharing illegal content, downloading and watching pirated media then this is absolutely also illegal.

But if this is what you are using a VPN for then proceed caution.