Astronomers are now able to predict when a certain type of star will let loose a powerful eruption.
The explosions occur on a neutron star, a city-sized remnant of a giant star that exploded in a supernova long ago and collapsed into a hyperdense ember. It now siphons material from a companion star while the two objects orbit each other every 3.8 hours.
The neutron star has incredibly strong gravity, so it sucks in some of the gas from the companion star's atmosphere. The gas spirals onto the neutron star, slowly building up on its surface until it heats up to a critical temperature. Suddenly, the gas at one small spot on the neutron star's surface ignites a powerful explosion, and the flame quickly spreads around the entire star.
More: http://www.space.com/scienceastronomy/080430-neutron-star.html