In the 4-5th century, people use to worship cats. They were considered as representatives of Gods and sometimes even the God themselves. Even in ancient Egypt, we can see many pharaohs looking exactly like cats. Even after being at such high position why suddenly cats were counted as the evil?
According to the records, the black death was peaking in 1347-1351. That was a time when Christianity got a real hold of their situation. They wanted to erase anything which can later cause a threat to their religion. So they targeted witches. They claimed that witches use magic and got their powers from the devil and thus they started witch trails or witch hunt in the early middle ages, which is the 14th century. While witches only used to brew some medicines in their kitchens to help the sick people, they were considered as evil.
But how is all that related to black cats? Here's how:
Since the popularity of cats, from the very starting, was that they are mysterious and nocturnal creatures. They were also associated with high femininity. So it was easy for cats to get associated with witches as they used to be mysterious and nocturnal too.
So as per the saying goes for witches, they got associated with cats too. A black cat became a really easy target because of its fur and eye color.