Diamond can say this because it is a matter of historical fact. We know that food production has been around for about 10,000 years while writing has only been around for about 5,000 years.
Diamond also tells us, though, why this sequence is reasonable. Basically, if there is no food production, there is no reason to go to the effort to create and pass down a system of writing. Writing began with record keeping. Diamond talks about it being used to record "numbers of sheep and amounts of grain" (p. 218 in the paperback edition). Until there is food production, there are no storehouses full of produce. There are no governments that levy taxes that must be recorded. Therefore, food production logically comes before writing.