Oops. Well, if you are good, you become one with the Force. Or if you live a life filled with atrocities, but do something good right at the end, you also become one with the Force. That's about it ;)
In all seriousness, it's a topic I'm glad you brought up, and I have little doubt that such experiences have shaped religious thought for years. I find them interesting and quite plausible, and I don't believe science has somehow answered all questions about it just yet.