At the beginning of WW2, although they were slow in actually attacking Germany, Britain and France did declare war against it after Germany invaded Poland. The reason for this was the treaty where they guaranteed Poland against foreign invasion. However, the Soviet Union also invaded Poland during this period, yet there is no ultimatum (as far as I know) or declaration of war.
Was there a legitimate reason for this inconsistency? I don't think the Soviets were allied to France and Britain back then.
The political reasons of both France and Britain are well explained in other answers, so I just stick to the legal matter.
France was not legally obliged by any pact to attack Soviet Union or to send troops to Poland to help. The 1921 Franco-Polish treaty specified the extent of help, which amounted to keeping the communication lines free between France and Poland (France and her Eastern Allies, 1919-1925). The 1939 pact, already ratified on September 4, was strictly against Germany, and had no provisions against Soviet Union (Britain, Poland and the Eastern Front, 1939).
Britain, on the other hand, was legally obliged to attack Soviet Union, literally "at once" and to provide "all the support and assistance in its power", per the 1939 pact. There was no legal trick that allowed Britain to avoid this. Britain recognized Poland as a country, and the pact obviously didn't require Poland to be recognized by invaders. The pact did not require Poland to declare war on an enemy. Moreover, ambassador Raczyński requested such help from Britain as soon as Soviet Union attacked, and Halifax declined without any meaningful reason (Britain and Poland 1939-1943: The Betrayed Ally). Halifax said, 'As regards Soviet aggression we were free to take our own decision and to decide whether to declare war on the USSR or not.' (Britain and Poland 1939-1943: The Betrayed Ally)
Edit: As Andy pointed out in his answer, the obligations of Britain were more blurred than the public realized, because of the British-Polish secret protocol accompanying the 1939 pact.
On August 25, two days after the Nazi-Soviet Pact, the Agreement of Mutual Assistance between the United Kingdom and Poland was signed. The agreement contained promises of mutual military assistance between the nations in the event either was attacked by some "European country". The United Kingdom, sensing a dangerous trend of German expansionism, sought to prevent German aggression by this show of solidarity. In a secret protocol of the pact, the United Kingdom offered assistance in the case of an attack on Poland specifically by Germany, while in the case of attack by other countries the parties were required to "consult together on measures to be taken in common". Both the United Kingdom and Poland were bound not to enter agreements with any other third countries which were a threat to the other.
This being said you have to think in layman's terms. The British and the French saw Germany as the "MAIN" threat to their dominance of Europe. The Soviet Union of that era was still regarded as a "big but backward" country that wasn't an impending threat to the European countries. Especially after Stalin's purges of the communist party and the Red army.
One must remember that twice during the twentieth century Britain AND France have declared war on Germany and not the other way around. One must see the trend here, of both of these nations in seeing Germany as the growing power and thus threat, in central Europe. As for the myopia regarding the Soviet Union's potential of dominationg half of Europe all I can say is that "NEED MAKES FOR STRANGE BEDFELLOWS".
The main problem was, that Poland and USSR were not in the state of war.
The Polish government believed that Soviets will stop the aggression and forbid Polish troops to fight against Russians. It was because of a non-aggression pact since the peace treaty of Riga in 1921. The Poland did not want to break this treaty. Every assistance requested by Polish government was to make Russians withdraw from Poland, not to make war against them. The British diplomacy failed (or did not take any actions, I can't remember), but it was not the only "success" of British diplomacy since militarization of the Rhineland.
Later then, because the diplomatic relations between Polish 2nd Republic and USSR were not broken, the Sikorski-Mayski agreement could be made, and POWs from Russian part of Poland could go through Iran and Afghanistan to British India and Palestine to Egypt to fight Germans.
The diplomatic relations were broken after the revealing of Katyń Massacre; allowing thus to Stalin make a puppet government in People Republic of Poland. For British government, the Polish one on exile was then not necessary because USSR was now one of the main Allies, much, much stronger than occupied Poland.
And personal note…
As I remember from (communistic) school, the Soviet action was named "intervention to protect working class and peasantry against German invasion". There we no photos of Soviet and German troops fraternising on the Polish territory, as "they were enemies". Officially, the USSR saved Polish people and was Germany's enemy since the very beginning (1939).
Britain and France regarded Germany (Hitler) as the greatest evil, and had their hands full with him Declaring war on the Soviet Union, and forcing it into a permanent alliance with Hitler would have been a big mistake. Probably they hoped that Germany and the Soviet Union would have a falling out, and the latter would become their ally. Which, in fact is what happened, leading to the defeat of Germany.
It's something every boy learns on the playground: "You don't want to be the odd man out in a three way fight."
In Book Two, Chapter 3, of The Gathering Storm, Winston Churchill quotes from his Cabinet memo of September 25, noting that he "struck a cool note".
… They [the Russians] are now limitrophe with Germany, and it is quite impossible for Germany to denude the Eastern Front. A large German army must be left to watch it. I see General Gamelin puts it [as] at least twenty divisions. It may well be twenty-five or more. An Eastern Front is, therefore, potentially in existence.
In a broadcast of October 1 that years Churchill further states:
Russia has pursued a cold policy of self-interest. We could have wished that the Russian armies should be standing on their present line as the friends and allies of Poland instead of as invaders. But that the Russian armies should stand on this line was clearly necessary for the safety of Russia against the Nazi menace. At any rate, the line is there, and an Eastern Front has been created which Nazi Germany does not dare assail…
Churchill's reference to the line held by the Russians as "necessary" is to earlier discussions the previous summer between Poland and the Soviet Union, on the terms by which Russia would ally with Poland. The Soviet demand was to be allowed to advance their troops to this line as a suitable defensive measure by which to assist Poland. Poland refused this demand, subsequently leading to the Molotov-Ribbentrop Pact. Churchill states that he finds both the demand and the refusal reasonable stances for the respective parties, though mutually unfortunate.
It is clear from these contemporary statements that Churchill is well aware of the violent hatred between the Communist Soviet Union and Nazi Germany, and fully intends to leverage that to British and Allied ends through the struggle against the Axis Powers.
This is because the USSR claimed that its non-aggression treaty with Nazi Germany was strictly defensive in nature, and was not directed at any country. It was only after the USSR ended its war with Japan that the USSR invaded Poland. Even then they claimed they were protecting the minorities in Poland from German atrocities. This prompted many to believe that the USSR would remain neutral throughout the war, and the western Allies did not want to drag it into the war unnecessarily.
I do not know for factual reasons, possibly others will answer, but if to speak formally, they had no legal pretext for doing so because Poland itself did not declare war on the USSR.
Yes, in a larger and important sense, the economics prove more controlling in conjunction to the prevailing personalities of that time. Legally the western allies should have declared war on the 18th September against the Soviet Union. However, those "quiet forces" rationalized different. Perhaps, more contemporary understanding of just how much human resources were available to the soviets removed any delusions in honoring commitments to Poland.
They could not fight Germany alone because they were wartorn nations. They knew that the territories of Poland, Germany, and the USSR would have a war and they would destroy each other. Then, there would be no compitition for them left in Europe.
As always it was all about money. Germany was an economic threat to Britain, Russia was not. Germany had never intended a war with civilized nation like Britain. They only wanted to go east. Russia because of it's size was really the long term military threat. The smart play would have been for Britain and France to to join with Germany against Russia. Germany had always been their traditional enemy that being the mindset of Churchill who was living in the past. He had spent his life fighting Germany and could not see past that. Germany would never have had to enter into a pact with Japan. And we never would have had to aid Russia and fight against Germany. True Hitler was evil, but if you study you will find Stalin was even worse. The difference is Hitler filmed and documented all his evil doings and Stalin was much more secretive and crafty. By aiding the Soviet Union we created a monster we would have to fight and keep on fighting against. Just look at the Ukraine nowadays, Russia is no different than back then. Former KGB now in the Russian mafia run things over there.