As stated, if the student is a minor it is clearly wrong and even if the student is of age it is clearly unprofessional behavior on the part if the college professor. In both cases, in fact, it is unprofessional and the teacher/professor can lose their jobs at very least, and if a minor was involved possibly go to jail. Forget it!
If it's college then it's mainly due to things that could result in favoritism (both positive and negative consequences for student could result). Many schools also see it as taking advantage of authority or impressionable minds. It's best to avoid these types of relationships while being a student.