Yes, Kodi is entirely legal. Even in the countries where VPN is blocked, such as China, you can use Kodi in highly restricted countries. It is even copyrighted free content.