There's no rule set in stone, but in general, you are probably going to want to go a few years younger. The main reason being that guys are often a few years behind girls developmentally, and if you're in your late twenties and relatively well adjusted, you will literally CLEAN UP with girls in their early twenties that are used to dealing with guys with little or no experience with women.
Dating older women can be fun, but isn't really feasible when you consider the long term, if the age gap is more than a couple of years. Women in their late twenties/ early thirties will often instinctively avoid guys that aren't serious candidates for marriage- and younger guys and players are at the top of the list. Single women over the age of 35 or so will be more amenable to age gaps, but are a bad choice if you want biological children sometime in the not-so-near future, for obvious reasons.
For dating purposes, I would treat age as a non-issue. You are not obligated to marry any of these girls, so pursue the girls YOU find attractive right now.