Is there a reason that so many countries have flags with red, white and blue?
The reason why such a high number of European and other western nations use red, white, and blue in their flags largely seems to be due to the fact that they were easy and inexpensive dyes to use. Other colors, such as purple, pink, black, or yellow were more difficult to create with more expensive dyes and so the oldest flags largely use red, white, and blue due to their inexpensive requirements.
It may also be the case that the older flags which used this inexpensive dye most likely influenced other nations when they were established. A notable example of this is Russia being inspired to use these colors by the Dutch, which influenced other Slavic nations such as Croatia, the Czech Republic, and the former Yugoslavia to use these colors also.