We perform an exhaustive analysis of the luminosities of galaxies in groups identified in the Sloan Digital Sky Survey (SDSS) Data Release 7. Our main purpose is to perform a detailed study of the Schechter luminosity function parameters: the characteristic absolute magnitude and the faint-end slope, as a function of group virial mass in order to quantify their dependence on environment. We analyse the trends of the Schechter parameters as a function of group mass for different photometric bands, galaxy populations, galaxy positions within the groups and the group surrounding large-scale density. We find that the characteristic magnitude brightens and the faint-end slope becomes steeper as a function of mass in all SDSS photometric bands, in agreement with previous results. From the analysis of different galaxy populations, we observe that different methods to split galaxy populations, based on the concentration index or the colour–magnitude diagram, produce quite different behaviours in the luminosity trends, mainly for the faint-end slope. These discrepancies and the trends with mass mentioned above are explained when analysing the luminosity function of galaxies classified simultaneously according to their concentrations and colours. We find that only the red spheroids have a luminosity function that strongly depends on group mass. Late-type galaxies, whether blue or red, have luminosity functions that do not depend on group mass. The intrinsic change in the luminosity function of spheroids and the varying number contributions of the different types explain the overall trend of the luminosity function with group mass. On the other hand, dividing the galaxy members in the inner and outer regions of the groups do not introduce a significant difference in the Schechter parameter trends, except for the characteristic absolute magnitude in the high group virial mass range () which is an indication of luminosity segregation in massive groups. Finally, we also analyse the possible influence of the large-scale surrounding environment on the luminosity function of group galaxies. We find that galaxies inhabiting groups at low-density regions experience more pronounced variations on the Schechter parameters as a function of groups mass, while galaxies in groups at high-density regions show an almost constant behaviour. We discuss the possible implications of our findings in the galaxy evolution scenario.