FIRST TIME TRAVELER
Traveling from Phoenix AZ > London > Barcelona Spain. In London there is a 17.5 over night layover. I am planning on using this time to explore the city. Can you stay in the airport over night? Or would it be better to book a room?
Can confirm from my personal experience today, there is a No. 1 lounge in Terminal 3 where you can stay overnight in Heathrow for £60 that includes sleeping pod, shower and some food.
Not the best option, but decent if you have visa issues or really early morning flight
You can certainly stay in the airport. A friend detailed his 24 hours that he spent in Heathrow.
Of course, whether it's better or not is up to you. You'll probably get a better night's sleep in a hotel, but some people can sleep anywhere. I've slept in a variety of airports, or at least attempted to - some are better than others. Some have quiet corners, some are crowded, and others have security stopping you sleeping there.
You can always use sleepinginairports.net as a guide for your decision, if that helps.
If you want a more comfortable stay at Heathrow there are many hotels at Heathrow airport : http://www.heathrow-airport-guide.co.uk/hotels.html