We present density functional theory calculations on the iron-based pnictides RFeAsO (R = Pr, Nd, Sm, Gd). The calculations have been carried out using plane waves and the projector augmented wave (PAW) pseudopotential approach. Structural, magnetic and electronic properties are studied within the generalized gradient approximation (GGA) and also within GGA + U in order to investigate the influence of electron correlation effects. The low-temperature Cmma structure is fully optimized by the GGA considering both non-magnetic and magnetic cells. We have found that the spin-polarized structure improves the agreement with experiments on equilibrium lattice parameters, particularly the c lattice parameter and the Fe-As bond-lengths. The electronic band structure, total density of states, and spin-dependent orbital-resolved density of states are also analyzed and discussed in the frameworks of GGA and GGA + U. For all materials, by including an on-site Coulomb correction, the rare-earth 4f states move away from the Fermi level and the Fermi level features of the systems are found to be mostly defined by the 3d electron-electron correlations in Fe.