Up to 10 percent of people of any age, and as many as 50% of people over 70 years, have yellow toenails and/or a fungal infection called onychomycosis. This fungus is one of the causes of yellow nails.

Ageing itself can cause yellow nails, without infection. They are often brittle as well.
The fungus infects the nail bed and causes the nail to thicken and discolour. The thickening may push the nail away from the toe, sometimes causing loss of the nail.
Since onychomycosis is difficult to cure (with anti-fungal medication and cream) and recurrence is common, alternative treatments including Vicks VapoRub have become popular.

Note. This is not a huge amount of medical evidence for this treatment. It is more anecdotal. It is not clear why it works; it may be due to the menthol component.