Is it permitted to not take Ph.D. students who have girlfriends/are married/don't come in weekends...?
A disclaimer: I'm not an attorney. My opinion is my own but I'll give you my sources.
Here in the US only, universities are probably not prohibited from considering otherwise protected status in admissions, c.f., Fisher v. University of Texas at Austin, which upheld racial preferences in admissions.
But under Title VII of the Civil Rights Act of 1964, as amended, once the question becomes one of employment (e.g., they work for you and get paid a stipend) you cannot discriminate based on any of the factors you cite. You should also carefully avoid asking questions that suggest you're even thinking about it, c.f., "Federal Laws Prohibiting Job Discrimination Questions And Answers" and "Pre-Employment Inquiries and Marital Status or Number of Children" on the EEOC site.
Added: I agree with Anonymous. Even if you think you can get away with it, perhaps because it's not illegal in your country, I also think it would still be wrong.
Added: If you are the victim of unlawful discrimination in the workplace, HR is not your friend. A priori, their objective is to make sure discrimination complaints don't happen. But after the fact, their objective is to circle the wagons and make sure a complaint dies without the institution having to pay a settlement or admit that any wrongdoing has ever happened. A great outcome for HR is that you just quit and the problem goes away. From your latest performance reviews and interviews with your co-workers, it's clear you were unhappy and have been for months and it's been showing up in your work. So you quit. Poof! Problem solved. Separately, they'll figure out what to do with the others involved. If you think you may be a victim of unlawful discrimination, you should go first to your own attorney for competent legal advice, not HR.
Whether or not this is prohibited depends on where you live. In the United States, almost certainly yes (+1 to Nicole Hamilton for her answer).
My own personal belief is that what the professor proposed is wrong, whether or not it is illegal where you work. It also demonstrates an misunderstanding of how people's relationships affect their work ethic. It has not been my personal observation that single people outwork those in relationships on average. Indeed, I know people (both men and women) who are not only married but also actively raising young children, and who work incredibly hard in their discipline.
One may choose to take only those students who demonstrate talent, hard work, and/or drive. I recommend that professors do their best to judge these traits directly, rather than by how they conduct their personal lives.
As others have pointed out, we cannot comment on the legality of such discrimination without knowing the location. However, even if it is legal, it seems like a terrible idea. Much of the following has been covered in the comments, but I just want to summarise what I see as some major false premises stated or implied in your question:
Single people have more "free time" available than those in relationships
Being single does not exclude someone from having other hobbies and interests, or from spending time on the dating scene. And indeed, it may mean that certain day-to-day tasks are more time consuming as there isn't someone else to help do the cooking, cleaning, etc. etc.
Single people are more "driven" in their work
I don't get where this comes from. I guess it's true in a few cases that some people are single because they are obsessed by their work and don't have time for relationships, but this is by no means universal. Also, someone in a relationship might be driven by the feeling that they need to support their partner/kids. Importantly, relationships can provide emotional support and stability that, if lacking, might in some cases lead to a loss of motivation.
Spending more time working is inherently more productive
I think this has been fairly well debunked. Rest and variety is very important to remaining productive.
Being in a relationship makes one a less well-rounded person
?? Why would this be the case?
Accepting a student who is currently single will ensure that they remain relationship-free for the next 4 or more years.
Is the student going to be dropped if they start dating someone 6 months into their studies?