The official Polish tourism website explains:
Polish national colours are one of the few in the world of heraldic origin. They derive from the colours of the coat of arms of the Kingdom of Poland and the coat of arms of the Grand Duchy of Lithuania. In the Polish flag, the white symbolises the white of the Eagle, which features on the coat of arms of Poland, and the white of the Pursuer – a knight galloping on horseback, which features on the coat of arms of Lithuania. Both charges are on a red shield. On the flag, white is placed in the upper part and red in the lower because in Polish heraldry, the tincture of the charge has priority over the tincture of the field.Here, the British and Polish flags fly over a tent of the forces of the Polish Government-in-Exile in Scotland during World War II.
The red and white colours were first recognised as national colours on 3 May 1792, on the first anniversary of the signing of the Constitution of 3 May. They were officially adopted as the colours of the Polish State by the Sejm of the Kingdom of Poland in 1831 during the November Uprising. After Poland regained independence, the appearance of the Polish flag was confirmed by the Legislative Sejm on 1 August 1919.