That's just plain wrong.
It's like asking you in a job interview if your are married, who you are married to, do you have kids, what is your sexual orientation, how is your sex life, do you have any medical issues, may I look up your skirt, etc. These are all no-no's to ask in an interview -- part of Management 101 in the United States. Here are some more illegal questions to ask:
Asking for your password requires you to break a contract -- notably Facebook's terms of service. Should employers ask you to deliberately violate someone else's contract? Does that mean it is ok to violate their's?
Finally it is a major invasion of privacy and a security breach.
Work is work and what we do outside of work is entitled to be kept private if we choose to keep it private.
For more, please see: