Littlefinger has been trouble since he first showed up on Game of Thrones. He's spent most of the last few seasons manipulating Sansa out of a misplaced obsession with her mother, trying to bring about a scenario in which they could rule Westeros together. Fans have been counting down the days until he finally gets his comeuppance, and that day finally came in "The Dragon and the Wolf." Littlefinger was killed by Arya, putting an end to his nefarious influence. But why did Arya kill Littlefinger on Game of Thrones? Let's just say it has been a very long time coming.
With everything Littlefinger has done, it's not so much a question of why Arya did it as why it took her so long. Some of the horrors he'd inflicted on the Starks weren't public knowledge (like his hand in Ned Stark's imprisonment in Season 1), but he's done quite a lot of damage to the family right out in the open. If Arya killed him just for selling Sansa off to Ramsay Bolton, she'd be entirely justified. Littlefinger has provided the Starks with more than enough ammo to demand his death, but it seems it was his most recent plot that blew everything up in his face. Trying to drive a wedge between Arya and Sansa led to Sansa finally sentencing him to death for all his treasonous acts, an order Arya carried out for her. (That's what sisters are for, right? Am I getting that wrong?)
Littlefinger wanted to isolate Sansa from her siblings so that he could keep her on his side, but he didn't take her visible distaste for him into account as much as he should have. At first, he attempted to sow seeds of discord between Jon and Sansa over who had the right to rule the north, but when that didn't work he set his sights on ruining the tentative reunion between Sansa and Arya. His plan was to dredge up the past in an attempt to re-open old wounds and he did it all with one carefully placed letter.
The letter was one written by Sansa way back in Season 1 in which she denounced Ned as a traitor and urged Robb to bend the knee to Joffrey. Sansa was coerced into writing it, but that didn't matter to Arya once she read it. In "Beyond the Wall," it seemed like Littlefinger's plan had worked. Arya fell into the sisters' old dynamic easily, accusing Sansa of not doing anything to help Ned and of wanting to grab all the power she could for herself. Arya even appeared to threaten Sansa's life at one point. It looked like the girls were playing right into Littlefinger's creepy, creepy hands.
But Sansa and Arya were too smart for that. In a way, they'd only been building a better case against Littlefinger, allowing Sansa to pass the sentence that would get rid of him for good. And Arya was happy to carry it out, proving once again that you don't want to mess with Arya Stark. She may take a roundabout route, but she'll get you in the end. Just ask the Freys.