Coughing up yellow phlegm can indicate that the body is fighting off a disease and has produced mucous as a response, according to WebMD. Yellow phlegm can indicate the presence of a bacterial infection or another condition.
Allergies, colds and bacterial infections can cause the body to produce yellow phlegm. The reason why the phlegm is yellow is because of internal factors. When the body begins to fight off an attack from a virus or bacteria, the immune system will send white blood cells to the spot of infection. Called neutrophils, these are a green color, which can cause phlegm to have a yellow or green coloring.
Having yellow phlegm along with other symptoms, such as a fever, pressure in the sinuses and congestion can indicate infection. If this is the case, medications are available to treat the symptoms while the body fights off the infection.