Scientists have unlocked the 1,400-year-old mystery surrounding a red light that appeared in the Japanese sky.