I'm assuming Sansa had no idea what was going on but her necklace was used to smuggle the poison in with Olenna using the drunk guy who gave the necklace to Sansa as the patsy just in case something goes wrong as he's easily expendable and not seen as trustworthy or worth a damn to the rest of King's Landing.. Sansa adds a layer of plausible deniability to the assassination while possibly being beneficial to the responsible party.
Maybe Olenna thought Joffrey was too crazy and didn't want to risk her granddaughter, her family's best asset at the moment, by marrying her to an unpredictable nutjob. You might be able to manipulate him often, but one slip-up is bad news with Joffrey.
She might also use this as a way to secure even more power, possibly marrying Margaery off to Tommen (he seems older now) which would make them seem even more respectable while being with a much more level-headed king.
It's how I see it because I don't think anyone else would pull this off and have Tyrion as the perfect fall-guy like that and Olenna did spend some time with Sansa and their scenes together once again seem like foreshadowing. I just wonder if anyone else is involved.
Oberyn doesn't seem like the kind of guy that would do this as he much rather do it himself in a more violent manner. The only other people I could think of that would do something like this are Varys and Littlefinger and we haven't seen or heard from the latter in quite some time. He did really care for Catelyn and want Sansa to come with him at one point right? And now Sansa is fleeing with the drunkard? Who knows...
To me, Olenna is definitely involved in some way. Her motives just aren't 100% certain.
Fuck. I love this show.