The narrator doesn't play much of a role in the story itself, instead just presenting it to us after the Yankee dies by delivering the story to us as a journal written by the Yankee. The narrator first appears as a tourist in Winslow castle, and starts up a conversation with the Yankee. In the process, he observes the Yankee's qualities—"his candid simplicity, his marvelous familiarity with ancient armor, and the restfulness of his company—for he did all the talking" (1.1)—and eventually receives the Yankee's journal to read.
The narrator reappears at the end to witness the Yankee's death, which is key to letting the readers know what's happened. After all, if Hank is dying, he isn't simultaneously writing down the circumstances of his own death. The narrator can easily do it for him, though.
Interestingly enough, the closing section lists the narrator as M.T., which suggests that he's supposed to be Twain himself. It's an unusual maneuver—Shmoop is always encouraging readers not to assume that the narrator is the author—that foregrounds the fact that ultimately authors are the people leading us into, through, and then out of stories, whether they're hidden behind alternate narrators or not.