Carl Sagan believed they might be psychological replay of the experience of birth. Not all NDE are the wonderful walking into the light to greet a long lost relative. Some have hellish NDEs.
I've never had one, however I find it odd that this subject has come up. I just finished "Passage" by Connie Willis and would have have to say that I think NDE is similar to what it is in that book. A chemical response in the brain, nothing more.
had to face down a tornado once,
was hauled off a construction site in a coma,
plus many, many, many bizaare substance abuse situations,
and I detected no NDE's unless bizaare hallucinations count.
When I first read Carl Sagan's theory about NDE's, I found it very interesting. Bright white light at the end of a long tunnel= birth. However, these days, I'm more inclined to believe that NDE's are a chemical response due to a lack of oxygen reaching the brain. Just seems more plausible to me.