Transistor failure can occur due to a variety of reason. The following are some of them.
Age
Aging of transistor due to temperature variations inside the components due to carrying current can cause failure. The electrical properties of the materials inside can drift due to age.
External Causes
External causes such as spikes in the power supply, heat, mechanical damage can also result in transistor failures. Hence, all transistors should be adequately protected against overvoltage.
Poor Circuit design.

Overheating
Overheating is the most common cause of transistor failure. Hence, it is important that transistors be provided with cooling mechanism. Devices which contain temperature-sensitive electronic components should be kept in air conditioned environments.
Electrostatic Discharge
Electrostatic discharge can also damage transistors. Hence proper precautions against Electrostatic Discharge Should be taken.