Bloody, brown, white, yellow, or green phlegm may be a sign of an underlying condition or infection. Viral and bacterial infections, allergies, and respiratory illnesses can cause phlegm as a symptom.