This is a complicated question because not all
dark-skinned people do have dark eyes.
The answer, though, is evolution by natural
selection. More melanin (the pigment that colors
skin) in a person's skin resists more sunlight
before burning, and more eye pigment (and thus
darkness) does the same for eye protection. Thus
people who live in areas with a lot of sun have an
evolutionary advantage if they have dark skin and
if they have dark eyes, so over time humans have
evolved that way.
Skin and eyes are controlled by different
genes, though, so if a dark-skinned dark-eyed
person marries a light-skinned light-eyed person,
the children will have a mix of both kinds of
genetic material, and if those children marry
similar children of mixed ancestry, the resulting
combinations of skin and eye color will be all
over the place. This is why there exist light-eyed
people with dark skin and dark-eyed people with
Needless to say, in the modern age when we have
sunscreen and sunglasses, these evolutionary
adaptations no longer matter so much.