Legally, there is such a thing as too young as defined by whatever jurisdiction one is in. Not going into that here.
In terms of what's too big a difference between two people to make a relationship work? Totally depends on those two people as individuals, and on their chemistry together.
Maturity, being young at heart, mindset, etc. matter more than chronological age. I've met immature brats who were in their 50s, mature sophisticates in their late teens, little old ladies who were really only 35, and people in their mid-70s who were cool, fun, and more young at heart than most people 30 years their junior.
Plus, as one gets older, age matters less. At 13, ten years either way is like a generation. At 40 it's not a big deal.