The EU book The Rise and Fall of Darth Vader reveals that Vader personally gave the stormtroopers the order to kill Owen and Beru Lars, and that he knew who he was condemning to death before he gave the order:
“Lord Vader,” said one of the sandtroopers, adjusting a control on his helmet so that only Vader could hear his voice. “The Jawas sold a protocol droid and an astromech to these moisture farmers, but both droids are gone.”
Moisture farmers? Intrigued, Vader examined the holograms of the kneeling couple and said, “The farmers’ names?”
“Owen and Beru Lars, sir,” the sandtrooper responded. “They say they don’t know where the droids are, but it looks like a landspeeder is missing from their garage.”
Owen and Beru, Vader recalled...
“Tell Mr. and Mrs. Lars that they seem to have trouble keeping protocol droids on their property.”1
Not certain if he had heard correctly, the sandtrooper said, “Sir?”
“Then you may extend to them every courtesy that you showed the Jawas before you continue your search. Establish checkpoints to detain any droids entering Mos Espa or Mos Eisley spaceports. And one more thing.”
“Do not stop transmitting until I break the connection.”
“Understood,” said the sandtrooper.
Vader watched the sandtroopers carry out his orders on their helpless victims. He found the sight of rising flames — even holograms of flames burning millions of light years away — to be most satisfying.
I had always assumed that the stormtroopers killed the Larses on their own initiative, or in accordance with a previously given order. The version of events in this book is interesting, but it raises the question of why it took Vader so long to figure out who Luke was.
In canon, who gave the order to kill Owen and Beru Lars? If Vader was involved, did he recognize the couple before he gave the order?
1 A reference to the fact that Anakin took C-3PO from the Lars homestead the last time he was on Tatooine, without informing the Larses that he would do so.