Although everyone is different and develops at their own pace, personally, I feel when the age difference is 5, 7, 10+ years or more, it diminishes the amount of common ground between the two partners, and can potentially create an imbalanced power structure that can become exploitative or otherwise unhealthy.
Someone told me their guideline was "at least half the age plus seven." This stuck with me for some reason, I think because their formula allowed for relatively small age gaps on the younger end, and increasingly large age differences as the participants themselves get older (and the relative age gap is less glaring).
When teenagers are involved, I feel like they are especially vulnerable to being manipulated by older partners because of their naiveté or relative lack of experience. I wouldn't personally date a teen unless I were also a teen, and I would advise extreme caution to anyone thinking of having a relationship with someone so young and impressionable.