What’s the reason for isovolumic contraction and isovolumic relaxation?
To put it in very simple words the reason for isovolumetric contaction and relaxation is to make the necessary pressure changes that is necessary to allow blood to flow into or flow out of the ventricles.

The basic formula you need to remember to understand this is:-


  
  Fluids flow from high pressure area to low pressure area along the pressure gradient (Eg: Injecting a drug into blood stream - as the pressure in the syringe is higher than the pressure in blood vessel, the drug flows into the blood vessel)
  Pressure is inversely proportional to volume (when temperature is constant) - this is Boyle's law. In a container with a fixed amount of fluid an increase in the volume of container will cause a proportionate amount of fall in the pressure in the container and vice-versa
  


  

Isovolumetric contraction: 

The end-diastolic pressure in the aorta is in the range of approximately 90-100 mm of Hg. For blood to flow from left ventricle to aorta, the pressure in the left ventricle should exceed the pressure in the aorta. 

As long as the pressure in the left ventricle is lesser than the pressure in the left atrium, the blood flows from Left Atrium to Left Ventricle. When Left Ventricle starts contracting the pressure in the LV rapidly overcomes the pressure in left atrium leading to closure of the mitral valve. 

Now the pressure in the LV is greater than the pressure in the LA. So no blood flows in. At the same time the pressure in the LV is not sufficient to overcome the pressure in the aorta. So the semilunar valve remains closed. The ventricle continues contracting causing a time period in which there is increase in pressure without volume change as both inlet and outlet are closed. This period is called period of isovolumic contraction.

The isovolumic contraction ends when the pressure in the left ventricle becomes higher than the pressure in the aorta, which will cause the semilunar valves to open and blood to flow from left ventricle to aorta.

Isovolumic Relaxation:

The reverse happens in isovolumic relaxation.

As the blood volume in the ventricle decreases and the left ventricle starts relaxing the pressure in the left ventricle falls. When the pressure gets below that of the aorta, the semilunar valve closes. But the pressure in the ventricle is still higher than the pressure in the left atrium. So the mitral valve remains closed. So here too both the inlet and outlet are closed but as the ventricle is relaxing the pressure keeps falling. So till the pressure in the left ventricle falls below that of the left atrium, there is a time period volume is constant and the pressure keeps falling - this is called Isovolumic Relaxation.

This period is followed by opening of the mitral valve (as the pressure in the LV falls below that of the LA) and blood flows into the ventricle.

Take a look at the phonocardiogram linked in Majid's answer. It will help you understand what I explained.

Hope this explains your question