In the old Expanded Universe continuity, he dies of old age — a fittingly quiet end for the galaxy's most famous Jedi, and a deliberate contrast with how the saga treats most of its major characters.
It's worth flagging that the films tell a different story. The sequel trilogy gave Luke a very different final chapter, so which answer is "correct" depends entirely on whether you're counting the Legends material or the current canon. They're separate continuities and they don't reconcile.