In Star Wars: The Last Jedi, Yoda appears to Luke as a force ghost as Luke debates whether to burn down the tree storing the only remaining copies of the Sacred Texts of the Jedi. As Luke makes his way to the tree, Yoda appears behind him and talks to Luke about the inner conflicts going on inside him and reminds him that a Jedi must always be sure of his path. When Luke decides against burning down the tree and destroying the texts, Yoda summons a lightning bolt down upon the tree, setting it ablaze while Luke steps back in horror at the sight of the texts seemingly being lost forever (unaware that Rey had taken them earlier as she left the island.) When confronting Yoda as to why he did it, Yoda tells Luke that the true Jedi knowledge is within Jedi themselves and it is their responsibility, not books, to pass that knowledge on and continue the way of the Jedi. As Luke takes in the message, he sits with Yoda and shares a quiet moment with his former master.
when does yoda appear in the last jedi
As Luke makes his way to the tree