I just brought this up in another thread, about Enterprise's episode "Rogue Planet". Apparantly the explanation given for how it could sustain life was "hot gases from the interior". But I always thought the source of heat was nuclear fusion, or a sun, so it didn't seem possible to me.
But I did some research and it seems it may be possible for a wayward planet to maintain it's internal heat for some time before cooling off. The concept is called a "Steppenwolf planet".