They say that the eyes are the windows of the soul and if you have ever witnessed death (as I have) you'll understand this statement. I believe that when a person (or indeed any living entity) dies their life force moves on/dissipates or whatever you like to call it. You can clearly see this in the eyes, it is a change that for the onlooker can be quite dramatic and disturbing.
I can remember someone I once knew who (in life) was so vibrant that if you had ever met her in person you'd certainly not forget in a hurry. This was clearly visible in her face and especially her eyes and when she died the immediate physical change was unmistakable - I know, because I (like many other of her friends) was there when she died - with her eyes open - you could clearly see that something had gone, it was like looking into an empty shell - .
This is even noticeable in photographs, as the effect (in life and in death) is exactly the same.
As for the question of ghosts, it may well be that when a person dies their life energy may pass on to a different plane of existence which may (on occasion) given the right circumstances become manifest in our world - appearing as spirits/ghosts etc.
I'd like to think that we all move on to a different existence when we die, but (as of yet) there's no proof to corroborate same, so until that happens one can only speculate.
Si thee.