That would depend on how they died and if they were in a position to see the cause of death.
Say that I was hit from behind and did not see the person who delivered the blow, then I die, I may not be able to tell you who did it. In other words, death won't necessarily empower me with the psychic perception required to know.
Another example is if I died as a result of diabetes. Suppose I was in hospital for one month before I passed off but I went into diabetic comas frequently. My psychic perception was lost due to that.
Then after I pass that lost perception would not be available because it was never imprinted in my consciousness anyway.
Even in the case where I might have passed on due to a heart attack, my knowledge might depend not on direct experience but on what I heard medics describe. My heart might have died silently without warning and without my being able to pin point the cause of death.
So yes, a dead person can come and explain their death but only in so far as they know what happened. More than likely we on this side might have to explain to the ghost the cause of its death.