The same virus that causes chicken pox (the varicella-zoster virus, a member of the Herpes family of viruses) also causes shingles.
People who have had chicken pox are usually immune from getting it again. However, the virus lies dormant in the spinal cord and nerve tissue, and may be re-activated years later causing shingles. Shingles occurs in approximately 10-20% of people who have had chicken pox, and the risk increases with age.
The reasons for shingles occuring are not yet fully understood, however it appears that situations that affect the immune system, such as illness, stress or trauma, can cause the virus to be re-activated. The condition is more common in people with weakened immune systems (e.g. due to HIV/AIDS, cancer, chemotherapy, or high/long-term stress).