Let S be a system of N particles, and let \vec{F}_{i} be the net force acting upon the i'th particle.
The system's S rate of change of kinetic energy equals the sum of the particles' rates of change of kinetic energy.
Thus, if K_{i} is the kinetic energy of the i'th particle, the rate of change is:
\frac{dK_{i}}{dt}=\frac{d}{dt}(\frac{m_{i}\vec{v}_{i}^{2}}{2})=m_{i}\vec{a}_{i}\cdot\vec{v}_{i}=\vec{F}_{i}\cdot\vec{v}_{i}
where \vec{v}_{i},\vec{a}_{i},m_{i} is the i'th particle's velocity, acceleration and mass, respectively.
Now, the frictional force acting upon an object (or system S) acts upon the the "particle" directly in contact with the ground. Since the particle at the contact point is MOMENTARILY AT REST, its velocity is 0, and hence, the frictional force acting upon it cannot change its OR THE REST OF THE SYSTEM's kinetic energy! Otherwise stated, in rolling, friction does NO WORK.
In sliding, however, the particle at the contact point has a non-zero velocity, and hence, the friction force does non-zero work on the particle, and hence on the system as well.