In order to understand why Anakin Skywalker turned to the dark side, we must first know a bit about his life. Anakin was born into slavery on the planet of Tatooine, and started out as a smart, creative kid. When he was younger he would salvage random parts and scraps, and eventually created C3PO (his robot sidekick). He was trained to be a Jedi by Qui Gon Jinn and Obi Wan Kenobi after being found on Tatooine by Qui Gon Jinn, Jar Jar Binks, and Padme. After his training, he joined the resistance and helped at the battle of Naboo. He piloted a starfighter and destroyed the trade federations control ship, all at nine years old!
When Anakin grew older, he realized that he was the “chosen one” and became greedy for the power of the force. In the movie Revenge of the Sith, he tricked Mace Windu, a Jedi Master, to fight Lord Sideous. Anakin then used the force and pushed him out the window and he died. When Mace Windu died, he traveled to Mustafar (as a kind of ghost) and had a battle with Obi Wan Kenobi, and during the battle Anakin was pushed into lava and was about to die when Lord Sideous (AKA Emperor Palpatine) rescued him and brought him to a medical capsule on Coruscant. He then turns into the infamous Darth Vader. While some people think that he went to the dark side trying to save Padme (because Lord Sideous told him that that was the only way to save her from certain death), he actually went to the dark side because he wanted to be the most powerful jedi ever.
Anakin Skywaker was greedy for power and wanted to learn things about the force that could make him the most powerful Jedi in the galaxy. He eventually lost his way completely and transformed into the infamous Darth Vader.