Although the Poles were quickly defeated after the invasion of Poland and surrendered in a matter of days, Poland proved one of the most important Ally that France, Britain, and the United States had during the war. That is because they provided the cryptological expertise the Allies needed to crack Germany's Engima coding machines. The ability to read classified German transmissions was an invaluable asset to the Allied war effort in Europe and was responsible for bringing the war to a close a year or two earlier than it would have without that intelligence.
The Enigma machines were actually a group of machines that used extremely advanced cryptography to encode messages that were virtually impossible to crack. They were sold to the public in Europe between the World Wars and were used by Germany beginning in the 1920s. Germany modified them, however, to make them more complex and more difficult to crack. Furthermore, each branch of the German military used a different variety of code. This meant that even those who could decipher the messages of the army might not necessarily be able to decipher the messages of the navy.
The first person to break the Enigma was a Polish 27 year old mathematician named Marian Rejewski. He used advanced mathematics and some limited German instructions that had been captured to do this. He and two other mathematicians at Poland's Cipher's Bureau then developed practical methods whereby transmissions could be decoded, including a replica Engima. For the next six years, the Polish military was able to decode most transmissions that they intercepted from the Germans. Over a year before the German invasion of Poland in September of 1939, the Poles shared this information with the French and the British. The threat of war and the escalation in complexity of the Enigma machines made it impractical for the Poles to keep that information to themselves any longer.
Some mathematicians from Poland even traveled to England to help the British set up their own cryptology operations. This program, which would become known as ULTRA, was able to provide the Allies with advance knowledge of Germany's intentions before they ever acted. Obviously, this ability was worth a great deal and had to be protected, so the Allies went to great lengths to make sure that the Germans did not find out that the Allies could read their secret messages. Not only did they implement strict security at the decryption facilities, but they tried never to act on information gained from ULTRA unless they could engineer a cover story to explain how their troops or ships got there.