Massive luminous red galaxies (LRGs) are believed to be evolving passively and can be used as cosmic chronometers to estimate the Hubble constant (the differential age method). However, different LRGs may be located in different environments. We investigate the environmental and mass dependence of the formation of ‘quiescent’ LRGs by using the population synthesis software STARLIGHT. We derive the stellar populations in each LRG, and obtain the mean age distribution and the mean star formation history (SFH) of those LRGs. We find that there is no apparent dependence of the mean age and the SFH of quiescent LRGs on their environment, while the ages of these quiescent LRGs depend weakly on their mass. We also evaluate the possible uncertainties in estimating the Hubble constant by the differential age method when using LRGs as cosmic chronometers.