A paranormal investigator in Germany has given a very good explanation to this experiment.
Verklagekasper sein Kana, on youtube explains:
“Some ghost hunters use a flashlight to communicate with ghosts. Typically, the performing ghost hunter turns the flashlight’s head to a position where the lamp easily goes on or off by the slightest touch. Then the ghost hunter puts it on a table or on the ground and starts asking questions. Eventually, the flashlight seems to respond by going on or off. The questioning goes on, and the flashlight keeps going on and off without any noticable force affecting it. The ghost hunters claim that the flashlight is operated by a spirit.
But there is a physical explanation for the flashlight repeatedly going on and off by itself. This video presents experiments with the Mini Maglite 2-Cell AA (Xenon), which happens to be the model used in the TV-Show “Ghost Hunters” that made the trick popular. Experimental results and considerations of contact physics reveal that the trick is actually caused by a heat cycle.
In particular, the cycling is caused by the flashlight’s reflector expanding under the heat of the lamp and contracting when the lamp is off, thereby breaking or making contact as it is reducing or increasing pressure on the switch. The long and distinct on and off phases of the cycle are caused by complex events on the contact surfaces. First, when the lamp is off, some pressure is required to break the insulating layers of oxide and other debris that cover the contact surfaces. The lamp stays off until the reflector contracted far enough so that the spring in the tail cap inflicts enough pressure on the contacts to break the oxide layers. When the layers break, the first point of electric contact overheats, melts and spreads, and the contacts get welded together. As the lamp goes on, the reflector starts expanding from the heat of the lamp. It expands until it generated enough force to break the welded spot. Depending on the quality of the weld, the lamp either goes off quickly, as the contact surfaces jump apart, or it goes off flickering, as a bridge of molten metal is formed between the contacts which burns out. After the lamp goes off and the contacts start closing again, it takes some time to remake contact. Because if the surfaces jumped apart when the welded contact spot broke, the resulting gap needs to be closed again. In any case, pressure on the contacts needs to be built up again to break the oxide layers, which either grew back instantly after the weld broke or which got even worse by the oxidization and degredation of the liquid contact bridge. As contact is remade, the cycle starts again.”
See the video at: