  We take advantage of a semi-analytic model with a state-of-art implementation
of the formation of the intra-cluster light (ICL) to study the mass
distribution of the ICL in galaxy groups and clusters, at different redshifts.
We assume the ICL to follow a NFW profile with a different concentration,
linked to that of the dark matter by the relation $c_{ICL}=\gamma c_{DM}$,
where the parameter $\gamma$ is set to reproduce the observed relation between
the stellar mass in the brightest cluster galaxy (BCG) and ICL in the innermost
100 kpc and the halo mass ($M^*_{100}-M_{500}$), at $z=0$. The model is then
tested against several theoretical and observational results, from the present
time to $z\sim1.5$. Our analysis shows that the fraction of stellar mass in the
BCG and ICL within the innermost 100 kpc is an increasing function of redshift,
parameter $\gamma$, and a decreasing function of the halo mass. The value of
$\gamma$ required to match the observed $M^*_{100}-M_{500}$ is $\gamma=3$ at
$z=0$, but there are hints that it might be a function of redshift and halo
mass. This result indicates that the distribution of the ICL is more
concentrated than the dark matter one, but less concentrated than previously
found by other studies. We suggest that a modified version of the NFW is a good
description of the distribution of the diffuse light in groups and clusters,
which makes the ICL a reliable tracer of the dark matter, in good agreement
with recent observational findings.
