I think as long as they're close to the same generation, it's okay. Oh, and both people have to be legal. If someone is under 18, I think 3-4 years is the limit. My husband isn't much older than me, he'll be 28 on Friday, I'm 24.
My husband is 7 years older than me, and we don't have any problems because of the age difference. Actually, we're very close and it feels like there is no age gap at all. When we first started dating, people thought it was weird too. But over time those people will realize that when you really love and respect each other, the age doesn't matter. We're committed to each other and we always will be.