Exos were created by Clovis Bray (Mars research group, rivaled only by the Ishtar Collective) because "somebody wanted to live forever."
Cayde-6 was one of the earlier to be brought on, chosen because he had destroyed some space station property of Clovis, and he describes the process.
A human- who has a body and soul- is placed in "a place colder than a gas giant," and then they "lose their body to the ice." (This place was mentioned in its infancy by Clovis Bray II's memoir)
The Exos turned out to be linked to the Warmind Failsafe as a way to survive any catastrophe (said by Rasputin when he tried to learn to step between worlds).
Ghosts work like the Worms of the Hive. They take a portion of our Light to fuel our revival in the same way a Worm feeds on Light in exchange for eternal life. (A Guardian or Hive gets this back by generating Light through stealing someone else's). An Exo has Light because they are still a Soul- this is because Bungie heavily drew from Egyptian concepts of the Soul.