www-data can only login using password.
You can force the use of SSH keys with www-data but you'll need to keep your SSH keys in the /var/www/.ssh/ folder which is not a good/safe practice. It is better to create a seperate username and for all your SFTP needs.