In the case of pure rolling, static friction acts between the body and surface (F (frictional force) <=uN). This is because the point of contact during a pure roll is at rest or has no relative motion with respect to the ground (in case the ground is moving). Thus, energy remains conserved in initial and final states as frictional work is zero. In the case of rolling with slipping, there exists relative motion between body and ground as it rotates at a higher rate than it translates, that's why it slips (another condition would be skidding). And whenever relative motion prevails, kinetic friction starts acting and thus, energy is no longer conserved in initial and final states due to frictional loss.