It is rightly said that your nails are windows to your health. A healthy nail looks smooth and of a consistent color. It is normal for your nails to grow brittle or have vertical ridges as you grow old but any abnormalities such as discoloration, spots, etc. could be symptoms of a medical condition, stress, or poor nutrition.
Do note that certain medications can also change the appearance of your nails, so to be a hundred percent sure about an illness, it is always better to consult a doctor first.