Many cultures (Egypt, Celts, etc...) had war chariots either as mobile platforms or as troop transport. What other advance in warfare made them obsolete?
Why: Several factors determined the cost-benefit-ratio of war chariot. This ratio changed with different tempo in different regions, as different factors became differently important. To list the most important:
When: As said, the cost-benefit-ratio became worse at different times, also the knowledge of how to counter the typical strategies of chariots perfectly.