The searchlights in the photo aren’t intended for the use of the crews running the lights, it’s helping the AA gunners spot incoming bombers. And the anti-aircraft gunners aren’t located at the lights. The glare from light reflecting off the fog doesn’t impact them as much, the benefit of the light in spotting bombers is greater than the harm of reduced visibility from glare.
Gibraltar was a very big choke point, basically whoever owned it would be who got the use of the Mediterranean. No ship could basically get through this strait of Gibraltar without being sunk. Since the British owned it, it meant no Italian/German planes or boats could get through. Since the Axis were in control of the North Africa and they wanted to secure their holdings, Gibraltar seemed like an easy point of bombing and attacks to destroy its fighting power. Which is why they have so many lights and anti-aircraft guns on the rock, to try and deter and eliminate any would-be attackers.
Searchlights were used extensively in defense against nighttime bomber raids during the Second World War. Controlled by sound locators and radars, searchlights could track bombers, indicating targets to anti-aircraft guns and night fighters and dazzling crews. Searchlights were occasionally used tactically in ground battles. One famous occasion was the Soviets’ use of searchlights during the Battle of Berlin in April 1945. 143 searchlights were directed at the German defense force across the Neisse River, with the aim of temporarily blinding them during a Soviet offensive. However, the morning fog diffused the light and silhouetted the attacking Soviet forces, making them clearly visible to the Germans. The Soviets suffered heavy losses as a result and were forced to delay their invasion of the city.
WW II searchlights formed part of a system of aircraft detection linking : locator devices, searchlights, and antiaircraft (AAA) guns. The locators sent electronic information to the lights and guns, which in turn tracked the target in synch with each other. Once a locator of any of the aforementioned types had “locked on” to an aerial target, the concept was for both lights and guns to be trained on the target (via the height and distance data received from the locator) so the target could be nearly simultaneously illuminated and then destroyed. Locators were first based on sound and heat detection, and ultimately radar became the preferred method of target acquisition. Units were generally separate, but advances in radar technology late in the war saw the integration of radar into both searchlight and AAA gun designs. Antiaircraft artillery accuracy was at stake, both from tactical and economic points of view. In 1940, in England, for example, it took an average of 20,000 rounds of ammunition to down a single enemy aircraft! The demand for more accurate methods of engaging, tracking, and destroying aircraft, especially at night, was driven by the need to destroy more targets without expending lots of ammunition.