I think it depends on the person and the relationship. I believe you should spend a lot of time with someone before you get married, including sleeping in their home or having them sleep in yours (this doesn't have to include sex!). If you love someone you can usually overcome minor difficulties like annoying eating habits or snoring, but there are some people who are just not compatible when they share a living space. It's not always necessary to live together to determine if this is the case in your relationship, but it is one of the easiest ways.
Living together before you get married can also be useful in cases of necessity and can take some of the stress out of a relationship. For example, I was in a car accident a few months after my wife and I met. While I wasn't injured, my car was totaled and I was left without a way to get from my apartment to my college courses, other than her driving me. Rather than having her pick me up in the morning before my first class to drop me at school, picking me up from school late in the evening after she finished work to hang out at her place for a few hours, and then having her drive me home, only to repeat the process the next day (whew!), I simply moved into her apartment. All the running around could have put stress on our relationship, while living together relieved that stress and gave us more time to spend together as well.
In another case, if you or your partner is struggling to make ends meet, living together reduces the bills each of you has to pay. If money is something that causes you a lot of stress and leads to lashing out, which could impact your relationship, living together might be a good choice. However, be careful of letting your finances get too entangled with your partner's before any formal commitments are made.
So, like I said, I think it depends on the relationship. There are some good reasons to live together before you get married, but it is certainly not a requirement for a successful marriage.