There are several potential causes for nails turning darker in color. You will need to see your primary care doctor
or your dermatologist
, however, to help you get to the bottom of this.
By far the most common cause of darkening nails is chemical exposures changing the colors of the nails. The two most common chemical exposures are nicotine (from cigarettes) and nail polishes. If you smoke or frequently use nail polishes, you may want to discontinue them for a while to see if this make a difference.
In second place would probably be fungal infections of the nails. These are also very common and they can make nails darkened or yellowed, and often also distorted in contour and thickened. Your doctor would be able to determine if there is a fungal infection and, if so, recommend treatment.
Finally, certain serious medical conditions, such as cancer, diabetes, and vitamin deficiencies, may have an effect on the color of the nails. They may also cause the appearance of ridges or lines and they make the nails more brittle or peel up from the nail bed.
Start by seeing your doctor; they will be able to rule out serious medical problems and help you figure out what is going on.