Test Driven Development (TDD) is one of the cornerstones of Extreme Programming.
It teaches us how tests can be used to drive intuitive design, readable code, and develop good quality software.
Agile and Extreme Programming are both built on the philosophy of short, iterative feedback loops, and TDD covers the shortest version of this iterative cycle - writing a test and making it pass.