A good developer has many qualities that separate him from the average developer. One of them is being a good tester.

Many of the development tasks involve testing. Are the requirements correct? Is the architecture good enough? Is this unit code robust?

A good developer produces quality code, that will contain fewer bugs. If a developer wears the "tester hat" before, during or immediately after the development phase, many mistakes can be found and corrected before entering the code and appearing as bugs later, therefore improving code quality. And a good way to improve your testing skills, and thus your development skills, is learning proper testing.

ISTQB proposes a syllabi that tries to map the tester foundation knowledge, and unify the testing vocabulary. Many of the techniques presented in the ISTQB Foundation Level Syllabus can be applied also by the developer in their daily work, and at least the knowledge can be used to unify the vocabulary with testers, improving their communication.

For example, static testing techniques, such as reviews and code analysis tools, are also recommended practices of many agile methodologies as pair-programming and coding standards.

More important than learning techniques though, is to learn the objectives, goals and limitations of testing, and testing techniques. As some authors point out, the initial approach of developers to testing is to test 100% of the code. Developers should be aware of author bias, know where to put their testing effort, and how to do it efficiently.

Speaking more generally, wearing a "tester hat" makes the developer look at the big picture, not just implement the requested feature or bug at hand. It forces you to try to understand why is this requirement written, how the user will use the system as a whole, finding not only mistakes in the code or requirements, but also on what is left out of those.

In conclusion, many authors try to define what makes a good or great developer and this debate is still ongoing, but for sure good testing skills is a big part of it.