A fungal infection is the most common cause of yellow toenails. Additional medical causes for yellow toenails include diabetes, chronic leg swelling and yellow nail syndrome. Frequent use of nail polish and nail polish remover can also cause toenails to become discolored.
Fungal infections can occur when toenails are exposed to moist, warm places for long periods of time. Wearing close-toed shoes made of non-breathable materials can cause bacteria to mix with sweat and create a fungal infection. Athletes who wear the same shoes every day are often susceptible to fungal infections and yellow toenails, because their shoes do not have a chance to air out.