The attractive forces that hold atoms together in molecules and compounds, including covalent, ionic, and metallic bonding.