Tetany is caused by a deficiency of calcium, which leads to low levels of calcium in the blood, resulting in muscle spasms and cramps. Calcium is an essential dietary mineral required for various bodily functions, including muscle and nerve function.