Discolored fingernails can be a symptom of a fungal infection. There are also a few disorders that can cause nail discoloration, as noted by MedicineNet.
A doctor can determine the cause of discoloration of the nail depending on what color it has turned. Yellow or green nails usually mean a fungal infection in the nail and surrounding skin. If a nail turns red or black after being hit, a hematoma might have formed. Lung and liver disease also cause some discoloration to the nail bed. If the color has changed suddenly, a doctor should be seen to rule out any major issues. Nail polish can also stain the nail, making it seem as if there is some discoloration.