Of course, they have every right to date each other. BUT--their age difference is likely to cause problems.
Right now, the relationship suits both their needs. But people change a lot in their 20s. Most people realize they want kids after age 30, even if they didn't want kids when they were in their 20s.
If she were my friend I'd be concerned that she was setting herself up for heartbreak. I'd ask her if she'd considered the realities, but I'd be supportive after that. Ultimately it's up to the two of them to work this out.