Say I want to model the income from people's age, and we know the effect of age is not continuous, despite it being a continuous variable, and an obvious thing to do is to categorize the age variable. So far people have been doing this by breaking at the quantiles or something, but is there a "best way" (by whatever sensible criteria) to automatically determine the best breakpoint？
"By whatever sensible criteria" is itself a sensible if casual remark, and the nub of the matter. Here my criterion, or rather attitude, is that we usually have broad ideas about a relationship but need to be sensitive to what the data can tell us. That implies above all not throwing away information unless we are certain that it is really noise. We also need to be mindful that other predictors lurk, even if they are not within our dataset.
Age is in practice often already categorised when reported in completed years. Even if exceptionally you know people's birthdays and have fine reporting of age it's not at all obvious that age should be further categorised for investigating its role as a predictor.
Income is well known to be typically skewed, so much so that working with log income is almost a default procedure in various fields.
For exploration I would tend to look at geometric mean or median of income for each reported age. The geometric mean naturally corresponds to the mean of the logarithms.
I doubt that the relationship between age and income is "not continuous". There might be kinks in the curve corresponding to key stages in an education system, e.g. those who stay the full course in high school and leave at 18, those who do a first degree and leave at 21 or 22, and so forth. If you see these effects, some kind of spline approach with key ages as specified knots may be appropriate. In practice, we all know that people can move faster or slower through any system, people can go "back to school" in later life, etc., all of which would fuzz out any effects of key ages.
But binning ages will at best muddy any underlying relationship. It's throwing away information.
In some fields, there is a widespread habit of quantile binning, e.g. using deciles to divide firms into the least successful 10%, and so on, up to the most successful 10%. I don't fully understand the motive for this as compared with smoothing approaches, but I note that with a variable like age, it is usually impossible to get exactly or even roughly equal frequencies, given ties in the data.
NOTE: Age within a year (i.e. time of year when someone was born) is sometimes argued to have an effect on people's careers. In many countries schooling starts once a child is old enough but only once a year, so with a new school year those children who passed a certain birthday within the last 12 months start school. Then children in the same class vary with age, with some almost a year older than others (and physically bigger and stronger, perhaps more confident, etc.). So even the fine detail could have an effect, at least on average. You might need a very large dataset to detect this effect, but that's not to say it doesn't exist.