  We study the mass-to-light ratio of galaxy systems from poor groups to rich
clusters, and present for the first time a large database for useful
comparisons with theoretical predictions. We extend a previous work, where B_j
band luminosities and optical virial masses were analyzed for a sample of 89
clusters. Here we also consider a sample of 52 more clusters, 36 poor clusters,
7 rich groups, and two catalogs, of about 500 groups each, recently identified
in the Nearby Optical Galaxy sample by using two different algorithms. We
obtain the blue luminosity and virial mass for all systems considered. We
devote a large effort to establishing the homogeneity of the resulting values,
as well as to considering comparable physical regions, i.e. those included
within the virial radius. By analyzing a fiducial, combined sample of 294
systems we find that the mass increases faster than the luminosity: the linear
fit gives M\propto L_B^{1.34 \pm 0.03}, with a tendency for a steeper increase
in the low--mass range. In agreement with the previous work, our present
results are superior owing to the much higher statistical significance and the
wider dynamical range covered (about 10^{12}-10^{15} M_solar). We present a
comparison between our results and the theoretical predictions on the relation
between M/L_B and halo mass, obtained by combining cosmological numerical
simulations and semianalytic modeling of galaxy formation.
