So very many things can go wrong at a hotel, from a toilet leaking to awful smells to bedbugs. When the hotel is responsible for the situation -- remember, it can't stop the rain on your vacation -- the staff should do what it takes to make things right. This doesn't necessarily mean offering to reimburse you for a night or your entire stay, but sometimes it might.
Evaluate the Situation
Before requesting compensation for a bad hotel stay, give honest consideration to the circumstances. Did just a few small details fall short? Was there only a minor problem or two, or are you truly dealing with something disastrous? Did you promptly bring the problem to the hotel staff's attention and give them a fair chance to fix things? Did they acknowledge your complaint and how did they treat you while doing so?
Lodging a Complaint
When you complain, do so calmly and politely. Be specific about what's wrong and exactly what happened rather than making vague comments about things such as rude staff or a dirty room. Address your complaint to an on-site manager first; go higher up the chain only if you don't feel you were treated fairly or appropriately compensated. Express what sort of compensation you believe would make the situation right, and why.
Other Points of Contact
If your hotel was booked by a travel agent or as part of tour package, bring your complaints to these agencies. If there's reason to believe they were negligent, they may be responsible for reimbursing you; they should also be made aware of problems with the places they do business.