Everything in nature tries to get to a lower 'energy state'. Water flows downward, to have less gravitational potential energy. Excited atoms will give off photons to get back to their ground state. The list goes on.
If two chemicals react into products, it's because the sum of the energies of the products is less than the sum of the energies of the reactants. The chemicals can get to a lower energy state by reacting, so they do.
"Energy" here refers to "Free energy", which you may or may not have heard of...it's the 'G' in ?G
In early classes, they teach you other tricks to predict if things with 'react' or not...solubitility rules, acidity, stuff like that.
Hope that cleared things up
... ask some follow-up questions if you'd like