The energy of interaction between the atoms changes with distance between the nucleii. There is an optimal distance for the chemical bond which is where this energy is at a minimum. The minimum energy with respect to the energy of dissociated fragments (r -> infinity) is called the bond energy.
The above picture is for the case of the Hydrogen molecule, but each particular
chemical bond has its' own equilibrium distance and its' own bond dissociation energy.
The bond lengths of the halogen molecules are used to determine an approximate radius
for chemical (covalent) bonding of the halogen atoms. Perfect electron sharing is expected
between atoms of the same type, so the bond in this case is perfectly covalent.
Why do atoms for covalent bonds? two major factors:
Now combine atoms together to form molecules by pairing electrons
without changing the total number of electrons. Make an 'octet' around each atom in
this way (except Hydrogen which can only support 2 valence electrons and heavy elements
which can support 'super-octets' due to unfilled d- and f- orbitals).
Each pair of electrons is either shared between two atoms,
and is called a Bonding Pair
or is entirely owned by a single atom,
and called a Lone Pair
Sometimes the bonding pairs will be replaced
with a line for each pair of electrons.
Usually lone pair electronss are left as dots, but they two may be replaced by lines.
If more than one pair of electrons is shared between a given pair of
atoms, a multiple bond has formed. Draw a solid line for each pair of bonding
electrons in the multiple bond. A good Lewis structure has all the electrons paired
(this is not
possible if the number of valence electrons is odd) and an octet around each atom.
An additional feature of the Lewis structure is the so called Formal Charge,
which is assigned to each atom in the molecule.
The Formal Charge is defined as the number of valence electrons the neutral atom
should have minus the number of lone pair electrons it has,
minus one half the number of bonding electrons it shares.
The sum of the formal charges on all the atoms in the structure is equal to the total charge of the species.
A good Lewis structure has the minimum number and magnitude of formal charges,
and avoids having formal charges of the same sign on adjacent atoms.
Triumph of Lewis dot structure:

The hypothetical state of a molecule after all its bonds are broken can be used as a 'reference', just like we used the standard states of the elements as a reference for the Enthalpies of Formation of molecules. Thus the energetics of a chemical transformation can be estimated from the bonds broken and formed in the reaction
A specific example can be made from our old familiar combustion of methane
reaction. We calculated the enthaly change during this transformation before from
trditional thermochemcial methods. We can do this agian by using the average bond
enthalpies of C-H, C=O, {O=O}, and O-H bonds
So, the Heat of Formation of new molecule, or the Heat of Reactions of a given transformation can be estimated by using average bond energies and the above thermochemical analysis. This is not as accurate as using directly measured heats of formation (which is not an approximation!) but is sometimes very useful as a starting guess.