The molecules are composed of similar or different types of atoms which are bonded with each other through chemical bonds. We know that there are two types of chemical bonds; Ionic or covalent. There are several theories which can easily explain the geometry of molecules such as VSEPR theory (valence shell electron pair repulsion theory), VBT (valence bond theory) and MOT (molecular orbital theory).
The valence bond theory is based on the concept of hybridisation and resonance whereas VSEPR explained the concept of molecular geometry on the basis of lone pair and bond pair. According to this theory, in a molecule bond pair of electrons and lone pairs of electrons are arranged in such a way that there will be minimum repulsion between them. Because of this, the molecule will be in its most stable form. Let’s discuss one of the examples of geometry of water molecules to understand this theory.
Water is a three atom molecule with a bent (angular) shape. It is like the CH4 molecule without the top and back-left hydrogen's, or like the ammonia molecule without the back-left hydrogen and with the carbon or nitrogen atoms replaced by an oxygen atom.
With only the three atoms the bond angle of the water molecule lies in two directions. Like the carbon atom in methane and nitrogen atom in ammonia the oxygen atom in water is surrounded by four electron pairs. These pairs are not in the same plane as the three atoms, one pair is above that plane and the other is beneath it.
A molecule of water has an angular or bent shape. The H-O-H bond angle in a molecule of water is 104.5o, an angle that is also quite close to the 109.5o bond angles of methane.
A tetrahedral arrangement of the three electron pairs accounts for the angular arrangements of the three atoms. The bond angle is less than 109.5o because the non bonding pairs are effectively "larger" than the bonding pairs and therefore the structure is not perfectly tetrahedral.
The bond angles in H2O is close to those in CH4, This suggest that lone pairs as well as bonding electron pairs can occupy hybrid orbitals. For example, according to the valence bond model, the four electron pairs surrounding the oxygen atom in water occupy the sp3 hybrid orbitals like those in CH4.
In H2O two of the sp3 hybrid orbitals on oxygen contain bonding pairs, and the two contains lone pairs.
Each O-H bond is formed by the overlap of a 1s orbital of a hydrogen atom with one of the singly occupied sp3hybrid orbitals of the oxygen atom.