Molecules form from individual elements by bonding to each other through the valence electrons. These electrons are the one responsible for bonding. Molecules form because these individual element atoms are not stable by themselves. Hope this answers the question.