North Africa had a great amount of value in terms of naval strategy. Axis control of the North African coast, combined with Italy (and especially Sicily), denied the Allies the quickest path for shipping from Europe to India and the eastern Pacific. Allied control of Egypt, meanwhile, allowed them to contest Axis control of the Mediterranean, and deny them access to Italy's East African colonies. Control of the remaining North African coast would allow them to gain air superiority over Italy, and eventually invade. Control of Libya, one of Italy's most important colonies, was important to Mussolini's imperial ambitions. Capturing North Africa could also dissuade minor nations - Spain, Iraq, Turkey and nations in the Balkans - from joining the war on the opposing side, or encourage them to enter the war on the friendly side.
Before Italy's entry to the war in June 1940, the Mediterranean represented one of the most important routes for British merchant shipping. The Suez Canal provided a quick, easy route to the oil of the Persian Gulf, the rubber and tin of Malaysia or the rice, tea and manganese of India. It also provided a way to quickly reinforce Britain's eastern colonies should Japan threaten to act. With the Mediterranean protected at the western end by Gibraltar, and at the eastern end by the RN's base at Alexandria, it was free from raiders and submarines. Italy's entry to the war changed this almost instantly. Aircraft, ships and submarines from bases on the Italian mainland or in Libya made traversing the route far too dangerous for all but the most heavily escorted convoys. The shipping was forced onto the route round the Cape of Good Hope and through the Atlantic. This route was considerably longer than the route through the Mediterranean, increasing demands on shipping. It was also, especially for the Atlantic portion, much more exposed to threats from U-boats or surface raiders. A British capture of Libya would deny the Italians the ability to threaten ships passing close to the Italian coastline. It would also give the British bases from which to cover their shipping through the crucial central portion of the voyage. As such, Allied control of North Africa would allow them to resume sending shipping through the Mediterranean, making it a key strategic goal. Equally, an Axis capture of the Suez Canal would deny this possibility for good. Italian control of Suez would also allow them to access their colonies in East Africa. Eritrea, Ethiopia and parts of Somalia were all Italian colonies. They had no land connection to the rest of the Italian colonial empire, and were reliant on shipping through Suez. Capturing Suez would return this lifeline to them.
Britain's main naval bases in the Mediterranean were Gibraltar, Malta and Alexandria. Of these, Alexandria was the only one that could effectively be used by the Mediterranean Fleet; Malta was too easily threatened by aircraft from Sicily, just 60 km away, while Gibraltar was small, threatened by the possible entry of Spain into the war, and needed for ships operating in the Atlantic. As a result, the two other bases were only used by comparatively minor forces. Alexandria, meanwhile, became the base for the Fleet, from which it carried out attacks against the Italian mainland and against Italian shipping. It was strong enough that the Italian Navy could not reliably defeat it in a naval battle. By capturing Egypt, and thus neutralising the Mediterranean Fleet, the Italians could remove this threat to their interests. Equally, however, the British wished to see Mediterranean Fleet continue its operations, and so needed to defend Alexandria. Extending their ability to base aircraft and ships further forwards through the capture of Libya would allow them to make more effective attacks against Italy, its shipping, and Axis-held territory in the Mediterranean.
One of Mussolini's biggest ambitions for Italy was to turn the Mediterranean into 'Mare Nostrum' (Latin for "Our Sea). His vision was for the sea to become an Italian lake, surrounded almost completely by Italian territory, or by states friendly to Italy. As such, throwing the British out of Egypt was an important step in this. Not only would it, as outlined above, prevent the Royal Navy from interfering, it would open up access to the Levant, furthering Italian colonial interests. There was also the hope that, by demonstrating Axis military might, it might help swing fence-sitting nations, like Spain or Turkey, behind the Axis powers. For the Allies, taking Libya, jewel of the Italian colonial empire, would prove a major dent to Italian prestige. It would boost morale at home, as it would represent a victory in a war, that, until 1942, did not seem to be going well to most civilians. It would, equally, have an effect on neutral nations, hopefully swinging them away from the Axis and towards the Allies.
There are several reasons the North Africa was strategically important. First, airbases and ports along the North African Coast provided bases for whichever power controlled them. Control of these areas would decide which power would control the Mediterranean. The British used bases in North Africa, particularly Tunisia and Libya, to bomb Italy in 1943, while the Italian navy viewed its ports in Libya as a staging area for wider conquest in the Mediterranean.
North Africa also provided an Axis invasion route into Egypt, from which the Suez Canal could be seized. This would cripple British shipping and undermine the Empire’s supply systems and links to its other colonial possessions. Taking Egypt also provided an invasion route into Syria and the oil fields in Iraq. It would also link together Italian Libya and Ethiopian armies.
Finally, North Africa was one of the few arenas where the British land forces could fight Axis armies and hope to inflict defeat. While fighting Germany in Europe in the early war led to British defeats (in Norway, France, and Greece) the length of the Axis supply lines made Blitzkrieg impractical and meant that the British army had some hope of victory.
To add on the question: What battleplans existed for the eventuality of success in North Africa?
What was then the next step? Caucasus? What about south of Egypt? Iran?