Thermochemistry is the branch of chemistry that deals with the study of energy changes, particularly heat, during chemical reactions and phase transitions. It provides insights into reaction spontaneity, energy efficiency, and the enthalpic and entropic contributions to the Gibbs free energy of a system.