The Two-degree Field Galaxy Redshift Survey (2dFGRS) Percolation-Inferred Galaxy Group (2PIGG) catalogue of ∼29 000 objects is used to study the luminous content of galaxy systems of various sizes. Mock galaxy catalogues constructed from cosmological simulations are used to gauge the accuracy with which intrinsic group properties can be recovered. It is found that a Schechter function is a reasonable fit to the galaxy luminosity functions in groups of different mass in the real data, and that the characteristic luminosity L⋆ is slightly larger for more massive groups. However, the mock data show that the shape of the recovered luminosity function is expected to differ from the true shape, and this must be allowed for when interpreting the data. Luminosity function results are presented in both the bJ and rF wavebands. The variation of the halo mass-to-light ratio, ϒ, with group size is studied in both of these wavebands. A robust trend of increasing ϒ with increasing group luminosity is found in the 2PIGG data. Going from groups with bJ luminosities equal to 1010h−2 L⊙ to those 100 times more luminous, the typical bJ-band mass-to-light ratio increases by a factor of 5, whereas the rF-band mass-to-light ratio grows by a factor of 3.5. These trends agree well with the predictions of the simulations which also predict a minimum in the mass-to-light ratio on a scale roughly corresponding to the Local Group. The data indicate that if such a minimum exists, then it must occur at L≲ 1010h−2 L⊙, below the range accurately probed by the 2PIGG catalogue. According to the mock data, the bJ mass-to-light ratios of the largest groups are expected to be approximately 1.1 times the global value. Assuming that this correction applies to the real data, the mean bJ luminosity density of the Universe yields an estimate of Ωm= 0.26 ± 0.03 (statistical error only). Various possible sources of systematic error are considered, with the conclusion that these could affect the estimate of Ωm by a few tens of per cent