You can use theme music legally by respecting the intellectual property rights of the theme music creators, and following the license terms of the theme music you download. You need to check the license details of each theme music track before using it, and credit the original artist if required. You also need to avoid using theme music for commercial or illegal purposes, unless you have the permission or the license to do so.