Fog doesn't really affect the air quality at least not in a negative way unless there are many pollutants already in the air.
Fog can actually help the air quality though in some ways and some places as it can help clean the air and make it better to breathe.
Also sometimes fog can decrease the oxygen levels in the air because the fog and haze increases the airs humidity.
But the added humidity can be beneficial for your health and lungs.
That is unless the air is polluted and then you get smog which can be bad to breathe in.
But regular fog is not all that harmful.