The ethical concern is using an unequal rel
ationship for personal benefit (aside from charging a fee for your professional services). It is unethical for a professor to date a student because of the inherent power differential in the situation. Professors have an ethical obligation to act in the student's best interests, not in their own.
However, in all professions, junior colleagues grow up. Students become full-fledged colleagues and work alongside their former instructors. A nursing professor might find herself supervising clinicals in a hospital where the head nurse on the unit or the director of nursing is a former student, and they now have a mutual collegial rel
ationship, not the unequal one of professor-student.
Since the student is not currently, and will not be in the future, a student of the professor, they can socialize ethically. However, I ran into some sticky situations when I moved from teaching undergrads to grad students, because former students (who had been working in the field, and whom I'd been treating as colleagues) started applying to the grad school where I taught. It was sort of awkward having to switch back to treating them as my students rather than as friends and colleagues, but we survived.

And most of the former students were such hard workers and good students that there wasn't an issue of 'you gave her an A because she's your friend'.
But da
ting an undergraduate who took a class from me? That still feels squicky, until they graduate, as they may still 'need' me to be their professor. Letters of reference are only part of it; they may need mentoring and career guidance that they would naturally have the right to ask of a professor.
The couples I've heard gossiped about in academia are always of the 'turn in the grades, phone the student for a date' type. If the student's graduated, gone on to grad school, and then renews a professional rel
ationship with a former professor, which leads to romance...no, not remarkable at all.