Is it illegal for a 21 year old to date a 17 year old?

Legality depends on the state. Many states have a "close-in-age" exemption or a "rule of three" for statutory rape laws, where a 21-year-old dating a 17-year-old may be legal if the age difference is within a certain range. However, some states have stricter age-of-consent laws.