In several cultures, a yellow sky is considered a sign of divine presence or intervention. It is also believed that a yellow sky could mean good weather is about to come. The sky can turn yellow during a storm due to the way air molecules scatter light. It can also happen during a sunset because the sun is lower in the sky and it has to travel through more layers of atmosphere. In addition, the ominous look of a greenish-yellow sky is often associated with severe thunderstorms that can cause tornadoes and damaging hail.
It is not known exactly why the sky turns yellow during a storm but it is most likely due to a combination of factors. Most thunderstorms occur in the late afternoon or evening so the yellow color is probably caused by the sunlight passing through the clouds and atmospheric particles that scatter blue light leaving longer wavelengths like red and yellow. This same process is what causes the beautiful pink or orange colors of a sunset.
The color may also be caused by an influx of dust in the atmosphere. When the storms that produce tornadoes and hail move through areas they pick up dust and particulates from the ground and then blow them into the atmosphere. When hurricane Ophelia blew through Ireland and the UK back in 2017 it picked up dust particles from the Sahara and as it moved through Portugal it picked up smoke from the wildfires there.