How do you know if you should rent or buy? 

Fannie Mae has a great page of resources that you can work through that will give you more insight if you should rent or buy.

First things first -

1) do you plan to be in one place for at least 3-5 years, yes - probably buy, no - probably rent
2) can you afford the down payment and fees needed to purchase, if no you shouldn't buy,
     keep saving
3) do you need a potential tax break,
4) can you physically and financially afford to take care of a property, if no you shouldn't buy
5) do you want to build some financial equity through real estate

These are just some of the important questions you need to be able to answer before you decide. Check out the link above to see more on how to determine if you should buy or rent.