The lights are caused by solar particles caught in the earth's magnetic field. The magnetic field charges these particles and causes them to light in shades of blue, white, yellow, green and sometime red. The undulating occurs as the particles move along the magnetic waves in the atmosphere.
Alaskan native groups have many myths that surround the northern lights. Some believed them to be the spirits of children dancing in the sky, while others were more frightened of it and had myths that the lights could whisk you away from the earthly realm.
The lights tend to peak between 10 pm and 2 am, but they are still difficult to see in the more densely populated cities in Alaska. The aurora isn't visible every night, but you are likely to see it if the sky is clear. Intensity also varies each evening. During peak periods of solar activity the lights are more intense, while they are quite faint during quieter solar periods.