Generally, these molecules have other atoms attached to them. The chemistry of carbon is much richer than that of any other element. We have established that the elements are the same elsewhere in the Universe, so the laws of chemistry will be the same as well. We, therefore, suspect that life elsewhere will be based on carbon, but we should not discount the possibility that there is some other form of life. The important thing about carbon chemistry is that it needs an intermediate temperature range to flourish.
Water helps a great deal too.
We also need a source of energy to foster the chemical reactions. For these reasons we think that planets or moons are the most likely places for life to develop. Some people dodge the question and say it was God. The scientific approach is to see if we can come up with an explanation that does not require such a large adjustment to the laws of nature. As science progresses more and more of life's processes can be explained by chemical reactions.