Yes, you can use 529 money to cover rent, up to the amount you would have paid for on-campus housing. You won't need to provide any documentation on your tax return, but you need to maintain records of the amount the on-campus housing would have cost and the amount of rent you actually paid.