Is there a single word for a person who was ignored by everyone when he was alive, but later people realized his importance after he died? It can also be related to his work, teaching or something like that.
Idiomatic phrases like unsung hero and prophet before his time in part have such senses. The latter term implies that the person's importance eventually is recognized. However, as in FumbleFingers' unrecognized genius answer, posthumous appreciation is not a given for an unsung hero. For most of these terms, a person's importance may be recognized before or after death, or may never be recognized.
You could call that person a pioneer. They are often not recognised for their accomplishments until later (or at least not until after they go into uncharted territory where no other person has tread). I should note that it can also be used to describe someone who is still alive - its definition doesn't exclusively describe a deceased person.
However, it depends on the context in which you use the word.