In the prequels we see that both C3PO and R2D2 are Anakin's droids and they clearly both know that he's gone over to the dark side.
I would like to know an in-universe answer for the question; Why did they not tell Luke?
that Vader is Anakin?
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.
Sign up to join this communityFrom Wookieepedia:
Organa entrusted R2-D2 and C-3PO to Raymus Antilles, the Captain of the Tantive IV, who was instructed to treat them well and to wipe C-3PO's memory. Although R2-D2's inability to speak basic spared him from experiencing a memory wipe, it did undergo reprogramming to restrict access to the holo-recordings of Leia's birthparents, including Skywalker choking Amidala and her deathbed during delivery, to ensure that Leia's true parentage remained a secret.
I think for C-3PO the situation is clear: After his memory wipe he shouldn't have been able to remember that Vader was Anakin. For R2-D2 it is very likely that the reprogramming prevented him from telling Luke about Skywalker being Vader.
R2-D2 and C3P-O had their memories wiped by Captain Antilles shortly after the birth of both Luke and Leia. If not R2-D2, then at least C3P-O did.
From a scene in Revenge of the Sith:
Senator Bail Organa: Captain Antilles?
Captain Antilles: Yes, your Highness?
Senator Bail Organa: I'm delivering these two droids into your care. Treat them well, clean them up and get the protocol droid's mind wiped.
C3P-O: What?!?!
R2-D2: [Beeps] ... [Chuckling beeps] (I assume R2-D2 says somwthing like "Me too?! We aren't going to remember anything?!")
C3P-O: Ohhh nooo!
Although R2-D2's inability to speak basic spared him from experiencing a memory wipe, it did undergo reprogramming to restrict access to the holo-recordings of Leia's birthparents, including Skywalker choking Amidala and her deathbed during delivery, to ensure that Leia's true parentage remained a secret.
Maybe this also prevented him from telling Luke about Skywalker being Vader.