It is very common for the skin on the penis and the scrotum to be darker than the surrounding skin or the skin on the rest of the body. Generally speaking, this is usually normal and doesn't necessarily mean that you need to be alarmed.
However, it would still be worthwhile talking about the issue with your primary care doctor
. Also, if this is a new change for you (meaning if the skin has just recently turned dark) then this also is something that would need to be investigated more expediently.
There are a couple of medical conditions that could lead to skin darkening. For example, there is a condition called acanthosis nigricans, which causes darkening of the skin on the back of the neck, in the groin, and in the armpits. This is associated commonly with problems with insulin resistance, or pre-diabetes. If your doctor thinks this might be acanthosis nigricans they will definitely want to perform some blood work looking for any evidence of diabetes or pre diabetes.
Make an appointment with your primary care doctor at your earliest convenience. They should be able to answer your questions about this issue.