I like to look at ages on a more "general maturity" basis. Dating someone who is in the same stage of life as you is usually a good idea in my opinion. So high school kids can all date each other, ditto college students, but if you're finishing your Master's thesis while your date is planning for junior prom then it might be legal but I can't imagine you would have a ton in common; I changed a lot between highschool and now, and anyone too distant from me in age just wouldn't be appealing or relate-able.
At 24-years-old I'll generally date up to late 20's/early 30's, but not much lower than 22. That's just because I feel more connected to people who are in the post-college stage of life, and undergrad students just seem young to me now. (Too much older than me, however, and it seems like people are more interested in settling down and having kids, which I'm not ready for yet.) Those dateability groupings are not a hard and fast rule of course but that's my general instinct.