Yes. Using a VPN is legal in Sweden, and it is a normal part of remote work at Swedish companies.

Swedish courts have ordered some sites blocked. In 2017 the Patent and Market Court of Appeal ordered the internet provider Bredbandsbolaget to block The Pirate Bay and Swefilmer, and in 2018 Telia received a similar order covering several file-sharing sites. Spelinspektionen, the Swedish Gambling Authority, licenses gambling and bans unlicensed operators from offering games to players in Sweden. Some people try to reach such sites with a VPN or proxy, but the rules do not change for them, so it pays to be careful.

Technically, a VPN encrypts your traffic and shows websites the IP address of the location you choose. Copyright law and each service's terms still apply. For a plain explanation, read how a VPN works.