Can an author win the Newbery Medal when she or he has died?

Yes, an author can posthumously win the award.

There is no particular reason why they couldn't win it. But they would have had to die the year the book was published or before.