Later edit: Now Visual Code is part of Raspberry Pi OS, here is how to install it.
From here:
Open a new terminal. If you need super-user rights (you probably do), then you can enter sudo -s and press return to enter a super-user session. Run the installer for your current distribution:
APT instructions
(including Debian, Raspbian, Ubuntu and Linux Mint)
. <( wget -O - https://code.headmelted.com/installers/apt.sh )Press the return key. Once the installer has completed, you should have a “Code – OSS” entry in your desktop program list.
If you want to use Visual Studio Code on Raspberry Pi, this is the easiest solution I’ve found.