Well, my usual strategy is much as has been mentioned. When my wars go to plan, I hit a neighbour hard with the most advanced troops in the known world, take their best cities, and quickly force them to capitulate. Of course, it doesn't always go to plan (those damned samurai just don't give up!)
In the early (ancient/classical/medieval) days, I'm very unlikely to upgrade unless I have a very well promoted unit, as the advent of vassalage and theocrasy more often than not mean I can build new ready-promoted units, and my economy can't sustain the expense.
Moving from medieval to rennaisance I do start to upgrade, particualry to retain my city raiders (which from previous posts is pretty much standard practise) and when I have a great UU with free promotions. My current Viking game is a good example. I had an army of beserkers, mostly CR3, which I upgraded to grenadiers, and before they went obsolete I would commonly recruit a new beserker, promote them to CR2 and immediately upgrade to a grenadier before shipping them off to the front. Those best-of-both-worlds times (when you can still recruit an excellent unit and have it head off state-of-the-art) are real opportunities to shine. I recruited a surplus of beserkers, purely as a reserve against future losses.
With garrisons, I do want the best I can get, even in "safe" cities (now I'm no Sun Tsu, so safe is a fairly nebulous term to me!). These upgrades I'll do in waves, though. I'll turn off research for a big cash injection, and upgrade the garrisons of outer and isolated cities first (typically longbows/muskets to rifles). I'll then work my way toward the centre of the empire, but if I'm falling behind too much in tech, I'll stop until my science is back on an even keel, then have a few bursts of upgrading.
A GM's trade mission is always welcome at times like this, so upgrading needn't be at the expense of research.
I often play financial leaders (currently Ragnar), mostly to cover my woeful budgeting inadequacies, so a few turns without research can net a lot of cash.