Until the church banned such things, most people were buried at night. Torches furnished the light which both allowed the gravediggers to see and the bearers to scare off evil spirits and nocturnal scavengers.
Lit, the torch signifies life -- even eternal life. Extinguished, it stands for death. It can also stand for living memory and eternal life (e.g. an eternal flame).