Funds deposited into escrow by the buyer to demonstrate the buyer’s commitment to the contract. The buyer breaches the contract if he fails to complete the purchase without some legal excuse for not doing so. The most common excuse is due to an unsatisfied contingency. In most instances, if the buyer breaches the contract then the buyer will forfeit the earnest money.
In Washington, a seller can keep up to 5% of the earnest money if the buyer breaches the contract. More than that, and you need specific contractual language in order for the term to be enforceable. So absent unusual circumstances (and the assistance of a lawyer) don't ask for more than 5%.