In Return of the Jedi, the beginning sequence shows C-3PO and R2-D2 making their way to Jabba the Hutt's palace. They are sent there to bargain for Han Solo's life.
When the negotiations with Jabba begin, R2-D2 shows him a message from Luke Skywalker. In that message he offers the two droids as gifts in exchange for Han Solo. To which C-3PO says:
C-3PO: You're playing the wrong message!
So C-3PO is obviously very surprised that Luke has just said this.
Then, on Jabba's barge, we see a plan play out that Luke Skywalker has already put in motion.
We see C-3PO bump into R2-D2 and warn him that they are about to kill Luke and that they might be next, but R2-D2 says something which C-3PO responds to by saying:
C-3PO: I wish I had your confidence.
So this just reinforces that R2-D2 was in on the plan as he was also preparing Luke's lightsaber to launch it in the air to where Luke was on the smaller craft.
The only way for this to have played out was if Luke had given his lightsaber to R2-D2 before they were sent to Jabba's palace. This is obviously the case since Luke did not have his lightsaber while being captured at Jabba's palace.
So R2-D2 had to have known details of the ensuing plan, but as we can C-3PO did not.