This is probably subjective due to beer styles, strengths, etc...
Personally I've kegged early and regretted it as the beer tastes green. The yeast seem to do more then just eat sugar and spit out alcohol. I usually keg most beers around 2.5 weeks and drink them by 3 weeks.