As katekat says, this is about leverage. And that means the answer will be different depending on how far along you are into the mortgage. If you have 5% equity and owe 95%, and your house value rises 5%, poof, you have a 100% return on your investment, because you only had to tie up 5% of your assets, and now your equity is twice that. If it's 30 years later and you have 100% equity, though, a 5% gain in value is a 5% return, because there is no leverage to act as a multiplier. This is why a number of people argue that you should never pay off your house, and why many real estate investors will often refinance once they get too much equity in any unit so that they can then deploy that money on additional income-producing assets. The downside, of course, is that those numbers work exactly the same in reverse -- if you have 5% equity, a 5% drop wipes you out, and a 10% drop means you're underwater.
The other thing to keep in mind is that the comparisons are never really apples to apples -- unless you live in the middle of a big city, you're usually comparing a cheaper rental apartment to a more expensive house (huge generalization, of course). So maybe you're comparing $800 in rent to a $1500 mortgage. That's an extra $700 out of pocket every month, but some of that goes to principal, which is basically equity that you get back when you sell. On the other hand, that equity isn't worth jack to you unless you are actually willing to sell; in addition, the house often comes with higher taxes, utilities, maintenance, etc. There is just no way to generalize, because the options and the relative costs are so highly local.
All of that is why I don't get caught up in this kind of argument. The reality is that you will need to pay some money to put a roof over your head -- but anything beyond the bare minimum is a consumption choice, pure and simple, regardless of how you choose to pay for it. The best way to get ahead financially is to keep your "must-haves" in check, focus on what you actually need, and not buy/rent bigger/fancier digs because you've talked yourself into it as a "good investment." If you want to evaluate the finances of your real options, look at the kind of places you would like to live in that are in your area, and then run all the numbers -- not just difference in rent/mortgage and opportunity costs, but commute time, maintenance costs, upkeep, utilities, taxes, schools if you have kids, etc.