Diamond's purpose in writing this book was to answer "Yali's Question." This was a question which had intrigued him for some time and he wanted to use his scientific background to help find an answer.
Yali's question centered around human history. Yali wanted to know, essentially, why white people have so much wealth and power in the world when compared to the people of most non-white countries. He wanted to know why Europeans were able to dominate the world.
Diamond's purpose in writing the book, then, is to put forward his answer to this question. His answer is based on geography rather than on race or culture. He argues that geographical luck is what made Europe come to dominate the world.