Well, what determines if you're going light or dark is where you assign your stars. If you assign them to dark powers, you'll eventually end up corrupted by the dark side. If you assign your stars to light powers, you'll end up being true to the light side.
You get starts by finishing the levels, and by finding all the secret areas on each level you're awarded with extra stars.
By the way, you should play the game both ways. It's pretty different if you go light or dark, the story and the levels are different and you get to see different cut scenes.