Most visitors to Thailand don't need visas in advance, but there is one thing that every foreigner entering Thailand must have -- a passport that's valid for at least six months from the date of arrival into the Kingdom.
If you try to check in for a flight to Thailand with a passport that expires in less than six months, you'll most likely be turned away before you can get on the plane. That's the best case scenario, because if you do manage to board the plane and get here, you'll be sent home on the first available flight back! Not a great way to spend a vacation.
Remember, U.S. citizens don't need visas if they're staying for 30 days or less.