Well apparently space is capable of sustaining the chemical reactions needed to create amino acids and sugars. It is surprising but it does seems as if space isn't as chemically inert as it used to be thought. After all, we have vast clouds of hydrogen filling space - along with at some point ammonnia gas clouds, water and carbon - that there gets us the raw materials for most organic compounds.
Throw in sulfur and phosphorus on some suitable planet and you've got most of your organic chemistry set right there.