Let's consider the following case: an object made of ebonite and some cat fur. Electron's from cat fur will move to the ebonite.
The friction energy $E$ is transferred to the electrons on the outside layer which are in this way freed from their bonds.
Since the material is an insulator they have no where else to go except on the other object that caused the friction, which gets charged negatively (they can't stay on the cat fur either because this happens during the friction process while energy is transferred to the electrons on the fur).
On the other hand if both materials are conductors while the objects are in touch there is going to be a current flow back from where they came creating heat in the process due to $P=RI^2$ - for example train tracks and train wheel when the train is suddenly stopping - you will see sparks and if you touch the wheel it's going to be hot.