This thread might help, especially /u/jester92800's comment here.
In short: red, white and blue were easy colours to use for practical reasons, and these gradually took on several meanings that became adopted in various national flags, from the pan-slavic colours to the flags of France, the UK, the US etc.