Molecules in star formation