The measurement and interpretation of intragroup and intracluster light: combining simulations and observations