Usually it's a very slow process. If it's a planet like Earth... [Thiiiinking.] The reason it becomes habitable is because we have Jupiter, I think. Jupiter is a planet that just missed being a sun, so it evens out the gravitational field.
So it takes millions of years before the planet that's deem habitable gets pulled so close that nothing can live on it.
For a planet to move away without some unnatural force, you'd probably need some other sun suddenly pulling it in the opposite direction. I'm not sure if a sun can form that close and not destroy the balance though anyway.