It all depends on the horse. My old trainer had a 26 yr old gelding that her daughter was still using to race. He was in escellent condition and he continued till he was 31 before they retired him...just because he had been working for 28 yrs and they figured he deserved it.
Its like saying "when should I retired from my job", if the horse loves what he is doing don't make him quit just because he's "old!" If he doesn't have any health problems that are affecting him and he's not in pain while doing it, there's no need to have an early retirement!