When we first moved to the NYC region, we rented, since we didn't want to buy a place without knowing more about the area. We were paying $2400/month for a townhouse, and had to beat out four other people for it, after it being available for rent for all of 2 days. The owners were way underwater, they bought right at the 2007/2008 market peak, it was newly remodeled just before them, they paid the highest price ever for any unit the complex, and they were hoping prices would bounce right back to what they paid. That didn't happen, we ended up making an offer on it, and bought it. They lost around $150k on the deal, we probably overpaid by ~$10k because we saved a lot of moving time and expense by buying the place we had been renting.
Our mortgage payments were under $2000/month, so in this case it was cheaper to buy than to rent. We paid it off with savings, because my DW is always concerned that something will happen to us financially and we'll be evicted and have to live under a bridge in a cardboard box. She is a bit of a worrier. . . :) So far that hasn't been too bad a move, since market returns haven't been awesome the last few years, and I think we could at least sell it today for a slight gain after expenses. I'd regret it more in the market of the late 90s. There are probably units in this area, and maybe even whole towns around here, where it is cheaper to rent than buy, I suspect it depends a lot on location, quality/size of the place, school district, and so on.
That ignores the "luck" factor of do you live in a hot housing market (I have a relative in Boulder, CO, he was definitely smart to buy), versus how does the investment market do with the extra down payment and monthly payment you would potentially put in to it.