In The Climb (6th episode of season 3):
Tyrion: Trying to have me killed is an odd way of saying thank you. There are two people in King’s Landing who can give an order to a Kingsguard. Did you or did you not order Ser Mandon to kill me during the Battle of the Blackwater?
Cersei remains silent.
Tyrion: The impulse I understand. He hates me because I’m the only one who tells him what he really is. So, fair enough. He wants me dead. But his stupidity? He could have had me poisoned and no one would have known. But the king orders a Kingsguard to murder the Hand of the King in full view of his own army. The boy’s an idiot.
Cersei: What do you want me to say?
There are different interpretations of this conversation.
It's popular to blame Little Finger for everything that happens, but I think that's unlikely. Barristan Selmy said of Ser Mandon Moore that he had no friends but his sword and no life but duty. Therefore he won't take orders from anyone, but the Royal Family.
Cersei hates Tryion, but she also knew that she needed him as the King's Hand until her father Tywin Lannister returns to King's Landing. She would have happily watched Tryion die, but not during the Battle of Blackwater when her children were at risk. (Quote from The Climb:)
Tyrion: I'm your family. A member of your family who has actively contributed to that family's survival. Whether or not you or Father or anyone else wants to admit it.
Cersei: I do admit it. If it weren't for your trick with the wildfire, Stannis would have sacked the city before Father got here.
That leaves Joffrey as the most likely "mastermind". He hates Tyrion because he treats him like a child instead of a king. Joffrey is also angry, that he cannot command the army himself (for example seen in Blackwater). It wouldn't have been the first crude command given by Joffrey.
Personally I think it was Joffrey's order, but we don't know for sure.