Magnesium ions are an essential cofactor for polymerase enzyme activity during PCR. They are added in the form of MgCl2(magnesium chloride).
When you add too little MgCl2, primers are unable to base pair with the DNA template. This may lead to weak amplification or total PCR failure.
1.5 to 4.5 mM is the ideal concentration range of MgCl2in PCR mixtures for satisfactory yield.