There were a few reasons common to both nations. Neither was ready for a conflict as they were attempting to rearm when the war broke out in 1936. Neither felt that it was ready to engage in a war and both wanted more time so they could build up their militaries. The thought was that the prospects of success in a war against Germany (and eventually the Axis) went up the longer it was postponed. The British felt that they would be vulnerable up until 1939 and the French were relying on assistance from the US and UK to be able to out-produce the German war machine (For more on this, reference Joseph Maiolo's Cry Havoc). Both nations also had to deal with rightists that wanted to support the Nationalists as well as leftists that wanted to support the Republicans and it was a difficult balancing act for the various leaders to remain between those two extremes. We also cannot forget the reluctance to spark another general European war less than 20 years after WWI ended.
Within weeks of the war breaking out a policy of "Non-intervention" was established, with the British and French being its biggest supporters. The goal was to isolate the war to Spain and to cut off the flow of material to the country. While Germany, Italy, and the Soviet Union were also members all three supplied the conflict (the first two backed the Nationalists while the Soviets supported the Republicans). The US--still largely isolationist in sentiment when the war began--also declined to intervene. (Antony Beevor covers Non-intervention well in *The Battle for Spain)
I think that it is also enlightening to ask why those nations that did intervene chose to do so. Germany wanted to undermine French security by removing a friendly neighbor to France's south and got a source of iron and other supplies for their assistance in men and material. As a side-bonus it was a chance to try out equipment and doctrine without instigating a war. Italy wanted to reduce French and British power in the Mediterranean so they could attempt to make the Med an Italian lake, and Spain was a relatively low-risk way to undermine French and British interests. The Soviets had no interest in seeing Germany expand its grasp in Europe, but also wanted to avoid the perception of a creeping communist menace to Europe because they wanted the possibility of an alliance against Hitler. The result was assistance to the Republicans but restraint in how much assistance was offered. Overall the decision to intervene or to not intervene in Spain was driven by the national interests of each nation involved more than principle.
As always, followup questions from OP and others are encouraged. Beevor is a great starting point for this topic, and Maiolo gives the cold logic of rearmament to underscore Beevor's points. Preston also does a good job on the opposition to the policy of Non-intervention in his The Spanish Civil War and Spanish Holocaust. The Wikipedia entry on Non-intervention in the Spanish Civil War is pretty good as well for a brief primer.