Model categories in deformation theory