Allergies and the very early stages of a viral infection ... as your immune system starts mobilizing against invaders. Yellow mucus indicates your immune system is actively fighting off an infection.
Laura Martin, MD, MPH If it's a viral infection causing the yellow or green snot, yellow in particular is very common with viral cold infections. Antibiotics are really not useful for that.