Aims. By means of the r-band luminosity function (LF) of galaxies in a sample of about 4000 clusters detected by the cluster finder AMICO in the KiDS-DR3 area of about 400 deg 2 , we studied the evolution with richness and redshift of the passive evolving (red), star-forming (blue), and total galaxy populations. This analysis was performed for clusters in the redshift range [0.1,0.8] and in the mass range [10 13 M ,10 15 M ]. Methods. To compute LFs, we binned the luminosity distribution in magnitude and statistically subtracted the background. Then, we divided the cluster sample in bins of both redshift and richness/mass. We stacked LF counts in each 2D bin for the total, red, and blue galaxy populations; finally, we fitted the stacked LF with a Schechter function and studied the trend of its parameters with redshift and richness/mass. Results. We found a passive evolution with z for the bright part of the LF for the red and total populations and no significant trends for the faint galaxies. The mass/richness dependence is clear for the density parameter Φ , increasing with richness, and for the total population faint end, which is shallower in the rich clusters.