I have almost always lived with other people who were not in my immediate family, which means that I have had roommates for over 15 years. In my experience it is better to live with someone who has the same living habits as you in certain areas.
I am a tidy person, and it is necessary for me to live with someone who keeps the kitchen and bathroom clean. I don't care about the rest of the house, but the relationship can go downhill quickly when one person is messy and another is clean.
I also am not really a night owl. If the person you live with is always up making noise and coming in at odd hours when you need to sleep or study, it can really cause irritation. It can also be difficult if someone has weird work hours. Being on a similar schedule is a good idea.
A person's vices can have a huge effect on your daily interaction. Smokers and non-smokers, drug users and non-drug users, drinkers and non-drinkers will all clash because these habits affect other people.
I suppose to sum up, if you are going to live with someone, make sure they don't have annoying habits that are going to get on your nerves. The little things turn into big things fast.
Between high school and college I had 4 different roommates. I got along well enough with all of them but I do not think that there is really any way to predict with certainty who will get along and who will not.
To me, one of the biggest things is that at least one of the roommates has to be easygoing and not very controlling. If both are like that, fine. But if you have two roommates who want things to be just so, I think that big trouble can arise. In my opinion, it is better to have a roommate who is not an only child because they are more likely to be used to having to compromise with other people and not have their own way all the time.