It has been theorized that a world could be habitable even if doesn’t orbit a star. After the expulsion of moons from solar systems, moons and planets could be close enough to create tidal heating, potentially making a rogue moon habitable.
Source: The Universe May Be Full of Habitable Worlds That Have No Sun
Please take a moment to support Amazing Stories with a one-time or recurring donation via Patreon. We rely on donations to keep the site going, and we need your financial support to continue quality coverage of the science fiction, fantasy, and horror genres as well as supply free stories weekly for your reading pleasure.
https://www.patreon.com/amazingstoriesmag