The light side ending turns on Galen Marek — the apprentice — being sent by Vader to create a diversion so the Emperor won't notice Vader has been training him in secret.
Galen's diversion is the Rebel Alliance. It works rather too well: the Rebels become a genuine threat, which means Vader has made a serious miscalculation. Because the rebels don't know Galen is the Emperor's would-be assassin, they treat him as a hero.
From there he turns, and confronts both the Emperor and Vader — and loses. The light side ending is a noble one rather than a triumphant one, which is very much in keeping with how the game frames the apprentice's arc.