A definition of Energy is 'something that drives a given system/state to become change' or the medium of change as I like to call it. This means that in order to form larger molecules from smaller molecules energy is required to break and form new BONDS within the system.
A simple example would be:
C (in the from of coal) + O2 + heat energy (flame) = CO2 (larger molecule) + some O2 and left over C from the ash and so on, this is commonly known as combustion.
or maybe taking H and N to form NH3 (ammonia) this take enormous pressure and heat, which are both components of energy, ie you need energy to heat a substance, and to pressurise it. The above is known as the Haber Process and it's how ammonia is produced industrially.
Hope that helps.