A formula often applied is when the cost of the repair outweighs the value of the car achieveable if the repair is carried out - the idea being that a new car not in need of repair could be bought for the same money, making it not 'worth it'.
Some problems with this tho - people always look to trade up and spend more money, perhaps quite a lot more, so there is a substantial cost anyway. Plus, when you're talking about older cars, and unless you get some sort of guarantee with the new one, there's nothing to say that it won't go wrong or need work in some way too.
If you like the car, if it's doing its job and there aren't a range of issues apparent, then even a quite expensive repair can be a good option - in my opinion its also greener.
If however, your repair is one of a series of spends that see you sinking money into a car that has a mix of end-of-life problems, such as a worn engine/gearbox, structural corrosion or substantial running gear failure on the cards or taking place, you really need to think long and hard about throwing good money after bad.
I think we do move much more quickly these days to sell/scrap older cars rather than repairing them, mainly because of the increased cost due to more complex vehicles, tests like the NCT not permitting minor faults through and the practice more prevalent now of replacing components and systems rather than repairing.