A team of Australian scientists believe they have uncovered the cause of one of nature's most bizarre phenomenon - ball lightning.

Ball lightning is typically the size of a grapefruit and lasts up to 20 seconds.

"Ball lightning has been reported by hundreds of people, for hundreds of years and it has been a mystery," said CSIRO scientist John Lowke, lead author of a new study published in the Journal of Geophysical Research Atmospheres.

Previous theories have suggested microwave radiation, oxidising aerosols, nuclear energy, dark matter, antimatter, and even black holes as possible causes.

One recent theory suggests burning silicon that has been vaporised by a lightning strike.

To unravel the mystery Mr Lowke and colleagues at the CSIRO and the Australian National University, turned their attention to reports of ball lightning forming near windows.

"There are many observations of ball lightning appearing from a glass window either in a house (or) in the cockpit of an aircraft," he said.

"If it's burning silicon, how did it come in?"

After hitting the ground and lighting the sky, lightning strikes leave behind a trail of charged particles, or ions. In most cases, these positive and negative ions recombine in a split seconds. Any remaining ions travel down to the ground.

Mr Lowke's theory is that some of these ions can accumulate on the outside of non-conducting surfaces such as a window.

"These ions pile up and produce an electrical field which penetrate the glass," he said.

Mr Lowke says the field gives free electrons on the inside of the window enough energy to knock off electrons from surrounding air molecules, as well as release photons, creating a glowing ball.

Recreating it in the lab

"This is the first paper which gives a mathematical solution explaining the birth or initiation of ball lighting," Mr Lowke said.

He says the next step is to use the theory to replicate ball lightning in the laboratory. That may still prove difficult, as it would require equipment capable of producing 100 million volts.

But a ball lightning event seen by a former US Air Force pilots suggests another approach.

While flying a C-133A cargo plane from California to Hawaii, former Lieutenant Don Smith saw two horns of Saint Elmo's fire appear on the plane's randome (radar cover).

"It looked as if the airplane now had bull's horns...they were glowing with the blue of electricity," he said.

"[It] was driven by ions from the aircraft radar operated at maximum power during a dense fog."

One aspect of ball lightning that the study did not tackle is the loud bang that can occur at the end of a display.

"About a third of the sightings end in a bang," Mr Lowke said.

"[It may be that] the electric field tends to heat the gas and the whole thing takes off getting hotter and hotter and hotter and the bang is caused by the expansion of the gas."

But he says that is just speculation and is happy to leave that for another study.