Renting and buying each have their own merits and their own pitfalls. As a renter, you might not be building any equity, but you also don't have to deal with property taxes (though in theory, they're priced into your rent), plumbing and structural issues, or insurance. You just put down one month's rent as deposit, and your landlord is obligated to take care of the place. But with buying, you run the risk of bankruptcy through foreclosure, negative equity, natural disasters, and all sorts of other nightmares that can come to characterize homeownership.
On the one hand, we like to avoid throwing money down a pit, we like the idea that we'll own a place we can retire to, and that, at some point, we'll be able to stop paying some sort of monthly fee to live somewhere. But this is a uniquely American notion, and one that has been called into question post-2008. That said, houses may be a good way to build wealth, but certainly not in the short term.
Thinking about a house as an investment tool is OK -- it can be used as collateral for loans, and you can sell it far in the future and make money -- so long as you don't forget that the house is much more than an investment tool. Plenty of people underwater in Phoenix and Las Vegas would likely tell you the same. Aside from the fact that a house is not likely to rapidly rise in value any time soon, your mortgage's amortization schedule does not encourage this sort of behavior. Your mortgage payments in the early years of your loan pay mostly interest, and then pay mostly principal in later years. You don't build a substantial amount of equity until much later in your life -- like, 15 years into the loan.
We say all that to say this: deciding between renting and buying is serious! It's a complex consideration that requires a handle on macroeconomics and long-term trends. Trulia keeps a rent vs. buy index on its site, which compares prevailing rents to average housing costs, and recommends one or the other. Miami is a “buy” city right now; New York is a “rent” city.
Only once you have a handle on your local real estate market, and your own long-term financial outlook (as well as the nation's) should you make a decision. Rates are at historic lows, and home prices are way down in certain areas, but uncertainty is at historic highs. Be sure you know your local market before you make a decision.