Welcome to BYC! Sorry about the loss of your chicken. Eating a black widow spider would not have caused its death. Unfortunately, it’s not real uncommon for this sort of thing to happen and there are a number of possible causes.
Heart attack (as you suggested) is one of them. Most commonly this happens with the very fast growing Cornish cross chickens, who are subject to all sorts of health problems.
Being egg bound is another fairly frequent form of death. Hens can die if a fully-formed egg gets stuck somewhere between their shell gland and vent. Sometimes it happens because the egg is too big, or there is injury to the reproductive tract that blocks the egg, or the chicken has calcium deficiency. Overweight chickens are prone to getting egg-bound. So are young hens that are pushed to lay before they’re fully mature. Egg-bound death doesn't typically happen real suddenly; there are usually signs that a hen is egg-bound and there a some steps you can take to move the egg. However, the blockage often isn’t discovered until after the chicken is dead and the owners can be caught by surprise.
Accidents can always happen
. A chicken could ingest something poisonous (but a black widow spider shouldn't do it). One bird could simply jump down from a high roost onto another bird. Sometimes weird accidents happen which just cannot be anticipated.
You may never know why your chicken died. All you can do is pay careful attention to your birds and ensure that there's nothing obviously dangerous. If you have reason to suspect injury or disease, or notice abnormal behavior in other chickens in the flock, get your dead bird examined immediately. If the rest of your chickens are doing their normal, happy chicken activities, I wouldn't lose any sleep over it. As one chicken owner put it: “Where there’s livestock, there’s deadstock.”
The only unsettling thing about having a bird die for no obvious reason is there is really nothing concrete you can change or improve as a matter of prevention and protection for the rest of your birds. Good luck with the rest of your flock.