The ghostly glows of the northern lights have awestruck generations of sky-watchers. But the inner clockwork behind the most intense displays has remained a mystery—until now.