We have gathered optical photometry data from the literature on a large sample of Swift-era gamma-ray burst (GRB) afterglows including GRBs up to September 2009, for a total of 76 GRBs, and present an additional three pre-Swift GRBs not included in an earlier sample. Furthermore, we publish 840 additional new photometry data points on a total of 42 GRB afterglows, including large data sets for GRBs 050319, 050408, 050802, 050820A, 050922C, 060418, 080413A and 080810. We analyzed the light curves of all GRBs in the sample and derived spectral energy distributions for the sample with the best data quality, allowing us to estimate the host galaxy extinction. We transformed the afterglow light curves into an extinction-corrected z=1 system and compared their luminosities with a sample of pre-Swift afterglows. The results of a former study, which showed that GRB afterglows clustered and exhibited a bimodal distribution in luminosity space, is weakened by the larger sample. We found that the luminosity distribution of the two afterglow samples (Swift-era and pre-Swift) are very similar, and that a subsample for which we were not able to estimate the extinction, which is fainter than the main sample, can be explained by assuming a moderate amount of line-of-sight host extinction. We derived bolometric isotropic energies for all GRBs in our sample, and found only a tentative correlation between the prompt energy release and the optical afterglow luminosity at one day after the GRB in the z=1 system. A comparative study of the optical luminosities of GRB afterglows with echelle spectra (which show a high number of foreground absorbing systems) and those without reveals no indication that the former are statistically significantly more luminous. (abridged)