I would stay away from the sexism angle, since the evidence we have for sexism here seems pretty tenuous to me -- the student whose behavior offended you could plausibly argue that she forgot to ask the male candidate the same question or that the question occurred to her only after the first interview, and quite likely there were many other questions on different topics that she asked one candidate and not the other, and that's hardly proof of any malice or discriminatory beliefs.
Despite this, I think the question your fellow student asked was inadvisable regardless of the candidate's gender. Simply, having children is such a common and universal part of human experience that it would be absurd for a faculty position to carry the premise that only people without young children are qualified for the job. If I were interviewing for a position like that, I would be seriously alarmed about any hint gathered during my interviewing experience that my job will be so difficult that I cannot do it effectively and be a parent (or have other extracurricular activities I like to spend a comparable amount of time on) at the same time.
As for what you should do, if you feel comfortable discussing it with the other student in a friendly and casual way, I see nothing wrong with mentioning the concern I outlined above, but try not to be patronizing -- the goal should be to help her understand the issue rather than to reprimand her for her behavior. And as I said, do not mention sexism unless there is much more blatant evidence that that was a factor.
Another option would be to inform your department chair or other faculty member overseeing the interviewing process about your concern that some of the undergrads participating in the interview are asking questions that have the potential to sabotage the success of the recruitment. But honestly, I doubt they will be surprised to hear this rather obvious fact, and I don't think they would necessarily view it as a major concern. The candidate probably realizes that undergrads are less experienced and professional in their attitudes and that this is likely to translate to them saying some awkward or embarrassing things during the interview, and will probably just shrug it off. (In fact, believe it or not, much older senior faculty members also sometimes say foolish things in interviews. And yes, that includes me -- saying stupid things is just a part of being human, and is likely to happen occasionally however professional one makes an effort to be.)