Answer:
Hello! Your answer here is the first sentence - When I was only eight, my grandfather died. This is a correctly written sentence and all references to different subjects are clear.
The second sentence is incorrect because it mixes tenses and also does not clarify that the person who is eight years old is the speaker.
The third sentence is written incorrectly and seems to suggest that the speaker's grandfather was eight years old when he died, which makes no sense. Therefore, the first sentence is correct.