You could use an Optical Fog Sensor (OFS). When the car's microcontroller detects that the quantity of fog has crossed a threshold, it can instruct the fog lamps to be turned on.
How OFS works - backscatter technique
A narrow beam of red laser light comes out of an opening on the front. A detector behind a lens in another opening is sensitive for incoming laser light in a narrow lobe that overlaps the transmitter beam.
If there are fog particles in the overlap zone light will be scattered back and reach the detector causing a signal on the sensor raw signal output. The sensitive zone is located about 30 cm ahead of the sensor and its volume is less than 1 cubic centimetre.
To know more about OFS: http://opticalsensors.se/ofs.html