The primary reason that the French didn't attack Germany was because their entire strategy and military had been built around the concept of a fairly static defence. They simply didn't have the doctrine and training necessary for striking deep into Germany in 1939. A large proportion of the French Army in 1939 was trained and equipped to man static fortifications. This is a strategy that would likely have worked wonderfully if they had been able and willing to fortify the entire border or if the Germans had attacked where the French were strongest.
As for the British, because the British Army planned to fight as an adjunct to the French Army, they were effectively locked into this strategy even though they were probably the most motorized and mobile force in the world in 1939. The general idea was that the allies would let Germany wear itself down by attacking the Maginot line and would perform a more mobile defence of Belgium, Northwest France and the Channel Coast.
One can argue that this was a missed opportunity, but I think it's equally likely that the Allies might have been slaughtered en masse if they had tried to attack Germany directly given their lack of preparedness. The German attack itself was a closer run thing than a lot of people realize and they had drilled and planned for this war. The bigger question to me seems to be why did the Allies fail to appreciate the real extent of the danger that the Germans would attack through Belgium and the Ardennes. It's not as though this wasn't fairly obvious and in fact it was appreciated that this was a risk, but not enough was really done to make sure that this risk was properly mitigated.
Follow-up question. The wikipedia page about the phoney war states that:
At the Nuremberg Trials, German military commander Alfred Jodl said that "if we did not collapse already in the year 1939 that was due only to the fact that during the Polish campaign, the approximately 110 French and British divisions in the West were held completely inactive against the 23 German divisions."[6]
General Siegfried Westphal stated, that if the French had attacked in force in September 1939 the German army "could only have held out for one or two weeks."
I'm not bothered about what-ifs, but what did the military commanders on all sides think about the Western Allies chances had they gone on the offensive against the Nazis? And what were the longer-term plans and strategies being considered had the Nazis not invaded France?