I have read a lot on this subject and I've went to many websites before I found a few that made sense. The only way to put it all together is by watching the director's cut, then listening to all the commentaries, then going to the website and reading the fictional book, by the fictional character, from the film, Roberta Sparrow. There is no need to do all this because people like Dan72 have done the work for you. Read this, then go to his weblink and that should pretty much give you most of the answers.
From the stroke of midnight, when Donnie awakens, near the beginning of the film, a highly unstable tangent universe is instantly created. This tangential or parallel universe will only exist for 28 days, before it will collapse into itself and destroy everything in existence. When a tangent universe is created, an "artifact" passes from the primary universe into the tangent universe (in ths case, the artifact is a jet engine). A "living receiver" (Donnie Darko) is the chosen one, who can restore the primary universe. His purpose is to return the artifact (jet engine) to the primary universe, which will bring an end to the tangent universe and restore the primary universe to it's original state. As the living receiver, Donnie is given several supernatural powers, such as super human strength and telekinetic powers, to help him complete his task. Within the tangent universe there are the "living manipulated" and the "dead manipulated". Their task is to help guide and reveal to Donnie his purpose. They are manipulated by an unknown force (it is hinted in the film that the force is God). The manipulated dead are those who died in this tangent, alternate universe, like Frank for example. The manipulated dead can travel to any point in time within the confines of the tangent universe. Frank travels from a point within the tangent universe that occured after he was shot and killed on halloween, which explains why he is wearing a bunny suit. He travels in time, to the beggining of the tangent universe and he attempts to guide Donnie to his destiny. Frank also travels to other points in time within the tangent timeline, to help guide Donnie toward his destiny and the restoration of the primary universe. Those beams of light that you saw in the film represent the "manipulated living being guided toward their future within the tangent universe timeline. The manipulated living are are also acting in certain ways to help Donnie complete his task. The manipulated living and dead do not fully understand what is happening, but they just feel compelled to do certain things. Once Donnie understands his purpose and what must be done to restore the primary universe, he telekinetically rips the jet engine from the plane and sends it through the worm hole that exists between the two universes. He sends the "artifact" back to the primary universe. The worm hole closes, the tangent universe ends and the primary universe is restored to it's exact state before the jet engine crashed into Donnie's house. Everyone who died in the tangent universe is alive again, because now the tangent universe never existed and they never died. Nobody is aware that the tangent universe ever occured. But in dreams, people can remember parts of what happened in the tangent universe, though they may not fully comprehend the meaning of their dreams. This is why the pervert played by Patrick Swayze is crying near the end of the film, because in his dreams, he saw what happened in the tangent universe and it is implied that he later turns himself into the police or maybe he kills himself. Donnie is now alive, but he awakens from his dream and remembers what happened in the tangent universe. Donnie decides to stay in bed and be killed by the jet engine, in the primary universe, because he was only saved from death by the fact that he was chosen as the living receiver and one of his guides (Frank) woke him up. If the tangent universe was never created, he would've stayed asleep and he would have died in the jet engine crash. He does not want to see a repeat of the terrible events in the tangent universe and he figures the safest way to prevent that is to sacrifice himself and die in the primary universe, like he was supposed to do in the first place. In the end everything is as it was meant to be.