The base assumption of why Obi-Wan doesn't remember R2-D2 -- in light of the prequels -- is that Obi-Wan is feigning ignorance in A New Hope to downplay the importance of the droid's arrival.
Obi-Wan greets R2-D2 and later recalls “not owning a droid.” Obi-Wan purposely withheld information from Luke in order to keep Luke from straying away. This could offer an explanation as to why he appears to not know who R2-D2 is. Further in Empire Strikes Back, neither Yoda nor Darth Vader recognizes either droid.
Meanwhile, R2-D2's cameo in Obi-Wan Kenobi comes a bit later on at the 38:45 mark of the episode. He's briefly shown on the right side of the screen as Bail and Breha Organa talk about Leia. The appearances of R2-D2 and C-3PO in Obi-Wan Kenobi work perfectly within the established Star Wars canon.
His memory was wiped at the end of Revenge of the Sith. A blabbermouth like him can't be trusted with sensitive information.
In The Phantom Menace, set 32 years before A New Hope, R2-D2 is portrayed as belonging to the Naboo defense forces, one of three astromech droids deployed for repair duty onboard Queen Padmé Amidala's (Natalie Portman) starship as it attempts to get past the Trade Federation blockade.
R2-D2 was present when Padmé gave birth to Leia and Luke, so he knew Luke was Anakin's son – but what he didn't know was that Anakin became Darth Vader. In addition to that, Anakin's fall was surely a painful event in R2-D2's life, one that he definitely wouldn't like to remember or even talk about.
Yoda recognized R2-D2 during The Empire Strikes Back.
However, Leia's strong-mindedness during Vader's probe denied him the opportunity to discover she was his daughter. That serves to justify Vader's lack of awareness of his connection to Leia, although, perhaps, not as satisfyingly as if Lucas had planned for the relationship from the beginning.
Vader relies on the complex life support system of his suit to survive and it happens to be very vulnerable to electrical discharges. So, if Vader ever had unleashed Force lightning, there's a good chance it would've caused his suit to short circuit, thus, killing him.
R2-D2 was in on the scheme to keep the secret away from Luke and Leia. He was devoted to the Skywalker family, and at the guidance of Obi-wan and Yoda, he would have maintained that secret in order to help protect the twins.
Every time she speaks, he remembers Padmé. Fighting alongside Sabé reminds him of fighting alongside his wife. While that is certainly painful enough, it's also reminds Vader of the man he used to be, a past he had long ago attempted to kill and bury. However, the memory of Padmé via Sabé won't let his past stay there.
There's nothing in the first Star Wars film to suggest Luke had never talked to Obi-Wan before; he simply hadn't spent any real time with him, mostly knowing him from rumors of a crazy hermit living out in Tatooine's desert.
During the Clone Wars, it was common practice to wipe the minds of astromech droids after every mission to avoid the risk of Separatists taking valued information. But Anakin remained staunchly against this idea for R2-D2, meaning the droid never had to worry about losing the memories of his past.
“It's good to fly with you again, my old friend,” the old man said, so softly Han wasn't sure he had heard him right. C-3P0 didn't; his memory was wiped at the end of Revenge of the Sith to prevent him from spilling the beans.
The lack of recognition could have come from an old man simply not remembering the passing droids of his youth. Lastly, Owen didn't seem the sentimental type to form any emotional attachments to droids.
Yes. In the book 'Tatooine Ghost', Leia learns of Anakin's life prior to his evolution into the Darth Vader personae. This revelation leads her to forgive him. She even named her third child in memory of her father.
Leia Organa-Skywalker
Leia Amidala Skywalker (portrayed by Carrie Fisher) is the wife of Han Solo, the mother of Ben Solo, the younger twin sister of Luke Skywalker, the daughter of Anakin Skywalker and Padmé Amidala, and the granddaughter of Shmi Skywalker, raised by Bail and Breha Organa of Alderaan.
R2-D2, the indomitable droid and mainstay of the Star Wars series, may be responsible for one more incredible feat: saving Grogu.
Remember that this is the first (and only) time Vader saw C3PO after RoTS. Threepio was getting pushed into an escape pod by R2D2 by the time Vader entered their ship in ANH. Though he was chased throughout the original series, this was the only time Vader actually saw Threepio, again.
Darth Vader didn't learn he had a daughter until Return of the Jedi, when he stood before Emperor Palpatine. The Emperor's power probed Luke's mind, attempting to goad him to fall to the dark side, and he discovered Leia's existence. "Sister," the Emperor taunted.
As such, by the time of Anakin and Padme's marriage, Anakin was the owner of C3PO and Padme the owner of R2D2 (or the state of Naboo).
C-3PO accidentally became part of the Battle of Geonosis when his head was affixed on top of a battle droid's body after a mishap in the Geonosian droid factory. R2-D2 and C-3PO witnessed the secret wedding between Anakin Skywalker and Padmé Amidala on Naboo.
Of course, the Father almost immediately wiped Anakin's memory, because he couldn't very well achieve balance knowing what he knew of his future. That's very interesting, though. It means that the Father knew that Anakin will become Vader, will destroy the Jedi, will literally annihilate whole worlds….