It's best to avoid painting your toenails if you have a nail fungus or infection. Painting your nails can trap moisture and bacteria, which can worsen the condition. It's best to wait until the infection clears up before painting your nails again.