It is because there are a build up of electrons on a material. If it is static it can be plastic or paper etc. The electrons are surplus to atomic requirements of the material so a negative charge will build up. If the charge is big enough the electrons will try and find a positive source to neutralise the charge. The only thing stopping it from doing so is the insulating material such as air.
But when the charge becomes considerably large, the air is no longer able to stop it, and we experience, the beautiful yet deadly phenomenon called lightening.