Halloween is associated with ghosts, which sometimes is associated with supernatural which can be associated with the occult. And cat have always been lumped into that unfortunate area of mysterious.
At one time, pagan religions dominated Europe. In the times before the first Christian crusades (they went north before going back south), the main Christian belief held witchcraft as evil (which was associated with paganism). Pagans held a strict belief in spirits and animals being able to aid, and this included cats. Cats, by proxy, were seen as evil by the invading Christian hordes (seriously, though, they didn’t use weapons for the most part, they used indoctrination).
Cats have this uncanny ability to sense things. They are incredible hunters and are predominantly nocturnal (though, there are many who are not). That’s cats as all encompassing, but what about black cats. Why the bad rap for the black kitty? Again, this can point toward ancient Christian beliefs. It was believed that black was evil, ill, vile. Whereas white was pure, untainted and good. Combine cats and witchcraft (already being side eyed by Christians) and now cats that are black, and the superstition arose that black cats were the ultimate in evil.
During the witch trials in the United States, black cats were often tortured and killed by puritans right along side the suspected witch Many puritans believed witches had the ability to change shape, and that shape was often in the form of a black cat.
It’s odd that black cats, and cats in general, were given such a bad name, considering many cultures around the world have a very different view. In Japan, Maneki Neko is considered good luck. In Russia, the Russian Blue is a symbol of good luck. In Latvia, black cats embody the spirit of Rungis, the god of harvests and good luck for farmers. Even in the United Kingdom, black cats have been associated with good luck for ages.