The peak effect and the quasiorder-disorder first-order phase transition for Magnesium diboride, MgB2, superconducting bulk materials have been studied. The peak values of the critical current density Jc, and the exact peak positions together with its corresponding half-widths for a constant temperature as well as for a constant applied magnetic field have been calculated by considering the quantum, thermal as well as random fluctuations of the vortex lattice. The results for MgB2 bulk materials are in agreement with the experiment. The peak effect for MgB2 superconducting thin films is also predicted theoretically. The expected peak effect may be observed provided that doping or other experimental techniques are applied to improve the flux pinning of the MgB2 superconducting thin films.