The starlight coming from the intergalactic space in galaxy clusters and groups witnesses the violent tidal interactions that galaxies experience in these dense environments. Such interactions may be (at least partly) responsible for the transformation of normal star-forming galaxies into passive dwarf ellipticals (dEs). In this contribution we present the first systematic study of the IntraCluster Light (ICL) for a statistically representative sample (Zibetti et al. 2005), which comprises 683 clusters selected between z=0.2 and 0.3 from ~1500 deg^2 in the SDSS. Their ICL is studied by stacking the images in the g-, r-, and i-band after masking out all galaxies and polluting sources. In this way a very uniform background illumination is obtained, that allows us to measure surface brightnesses as faint as 31 mag/arcsec^2 and to trace the ICL out to 700 kpc from the central galaxy. We find that the local fraction of light contributed by intracluster stars rapidly decreases as a function of the clustercentric distance, from ~40% at 100 kpc to ~5% at 500 kpc. By comparing the distribution and colours of the ICL and of the clusters galaxies, we find indication that the main source of ICL are the stars stripped from galaxies that plunge deeply into the cluster potential well along radial orbits. Thus, if dEs are the remnants of these stripped progenitors we should expect similar radial orbital anisotropies and correlations between the dE luminosity function and the amount of ICL in different clusters. The diffuse emission we measure is contaminated by faint unresolved galaxies: this makes our flux estimate depend to some extent on the assumed luminosity function, but, on the other hand, allows us to constrain the number of faint galaxies. Our present results disfavour steep (alpha<-1.35) faint-end powerlaw slopes.