The most common cause of death for a spider in captivity is dehydration. If the tarantula sits frequently over the waterdish are a symptom that your spider are kept too dry and are on its way to dehydrate. Trapped in a molt are another common cause of death if a rainforest species are kept too dry. If you are lucky the spider may loose one or two legs missing but often it ends up dead of direct injuries on the body or of stress. Prevent this by always have a full waterdish and pour water on the substrate when necessary.
Body injuries is another cause of death and most common is raptured abdomen. These wounds arise when the spider climbs up on the cage sides and falls down on a hard object like a rock and rupture the abdomen the spider is picked up and falls to the floor. The blood flow can be stopped with vaseline on the wound. Put the wounded spider in a clean plastic box with only some paper on the bottom. If lucky it will survive but most of the time it dies.
Make sure to remove food items and have a good ventilation in the cage othervise you can get mites in the cage. There are different types of mites and the worst kind are predatory mites. This type can kill a spiderling and indirect kill a adult by clotting the booklungs or the spider can die of stress. Clean the spider with vaseline on a small cottonstick and remove the mites. Put the spider in a clean cage with paper on the bottom. Clean the infested cage carefully. Make sure to change the substrate once every six months or so to prevent mites.
Wildcaught tarantulas sometimes have parasites internally or externally. Some grows inside the spider and finally kills it host. Small white worms can sometimes be seen around the mouth on wildcaught spiders. Not much to do except putting the spider in a clean cage and try to remove the worms on at the time with vaseline and a cotton stick.
If food insects are left in the cage it can pose a threat to the spider if the spider is about to molt. Some food insects, such as crickets and zophobas or superworms (Zophobas morio), can eat of the defenseless spider. If it loose one or two legs they can be regenerated at the next molt but a juvenile spider can die direct from stress and body injuries. Offer the spider one cricket at the time to prevent this from happen.
This should of course never happen. In the book The Tarantula the author tested how long a tarantula can live without food (and offered only water) and the longest period was two years and 9 months and 19 days (The Tarantula, Baerg, W.J. p. 27). If a spider are left without food too long it can in extreme cases bite off a limb to feed on (autophagy). It’s a unusual phenomena in captivity (I only heard about it once).
If the abdomen are small and shrunken it can be a sign of malnutrition and the spider needs more food, but it can also be a sign of dehydration (see above). Note that the abdomen are smaller just after a molt which is normal.
Dyskinetic Syndrome (DS) is a neurological disease that some say tarantulas can suffer from. The spider are unable to move around and the legs are twitching. If this really is DS I cannot say but atleast in one case it seems the cause was a airborne poison.
Here is a few links about this: