  We present a non-parametric, empirically based, model for associating galaxy
luminosities with halo/subhalo masses, based on a self-consistent treatment of
subhalo mass loss and the subhalo mass function. We find that, at high mass,
the mass-luminosity relation is almost independent of the actual luminosity
function considered, when luminosity is scaled by the characteristic luminosity
L*. Additionally, the shape of the total halo luminosity depends on the slope
of the subhalo mass function. For these high mass, cluster sized haloes, we
find that total luminosity scales as L_tot ~ M^0.88, while the luminosity of
the first brightest galaxy has a much weaker dependence on halo mass, L_1 ~
M^0.28, in good agreement with observations and previous results. At low mass,
the resulting slope of the mass-luminosity relation depends strongly of the
faint end slope of the luminosity function, and we obtain a steep relation,
with approximately L ~ M^4.5 in the K-band. The average number of galaxies per
halo/cluster is also in very good agreement with observations, scaling as
M^0.9. In general, we obtain a good agreement with several independent sets of
observational data. We find that, when comparing with observations and for a
flat cosmology, the model tends to prefer lower values for Omega_m and sigma_8.
Within the WMAP+SDSS concordance plane of Tegmark et al. (2004), we find best
agreement around Omega_m=0.25 and sigma_8=0.8, also in very good agreement with
the results of the CMB+2dF study of Sanchez et al. (2005). We also check on
possible corrections for observed mass based on a comparison of the equivalent
number of haloes/clusters. Additionally, we include further checks on the model
results based on the mass to light ratio, the occupation number, the group
luminosity function and the multiplicity function. (abridged)
