The short answer is that you upgrade when the benefits of upgrading outweighs the cost of upgrading.
Calculating the cost/benefit is another story. Benefits do not have to be limited to only new features, it can also be eliminating cost or risk associated with NOT upgrading.
When you make a decision, however, you have to look at the whole board. Just because something is "end-of-life" doesn't automatically mean you will upgrade. The cost of doing so may still be high enough to warrant the additional risk of running with an unsupported version. ATM-machines where I live ran on OS/2 Warp for years after IBM dropped it completely. The reasoning was "they are running fine now, have been running fine for years and we're not planning on changing anything" so they decided to accept the risk since replacing all those old ATM machines would have been prohibitively expensive.
Those ATMs have all been replaced now, but that didn't happen until they were going to replace them anyway, to make way for more modern ATMs with more features.
On the other end of the spectrum, I was at a company some years ago that was built around Oracle 9i. At this time, Oracle 9 was going end-of-life and the company, in what can only be described as a knee-jerk reaction, decided they had to upgrade the entire system landscape to Oracle 10, Java 5 and whatever was the latest WebSphere (can't remember). Anyway, we are talking literally several thousand servers and systems. In the process of this upgrade, it was discovered that the existing hardware wasn't compatible with the new platform versions so the entire hardware park had to be upgraded. Since they couldn't take down the existing systems while upgrading and their datacenter couldn't fit all the new servers, a new datacenter was needed as well. I have no idea of the exact cost of this, but it was in the $100+ million range. All this because Oracle 9 was going "end-of-life". Was it worth it? Hard to say, no real benefit analysis was done so one can only speculate if not getting Oracle support was worth over $100 million and 6 months of IT not delivering anything except upgrade.
So I guess the moral is that never upgrade if you don't have to or if there is a clear economic incentive to do so. And remember to factor everything into the calculation. Things like increased efficiency/productivity in development is also a benefit that must be weighed and valued.