Whiskers, also known as vibrissae, are sensory hairs that help cats navigate their environment. They are usually the same color as the cat's fur, but can sometimes be a slightly different shade.
So, if your cat has black whiskers, it's simply because their fur color is black or dark.