Cancellation excuses further performance

When is a buyer or seller entitled to exercise their right to cancel a purchase agreement and escrow instructions?