Electronic-structure calculations on the basis of a self-consistent charge, linear combination of atomic orbitals band-structure method have been performed for the pyrites FeS2, CoS2, NiS2, CuS2, and ZnS2. Photoelectron spectra, optical spectra, and Mössbauer parameters are evaluated and are found to compare well with experimental data. Molecular-orbital cluster calculations have been performed to derive local properties (Mössbauer parameters) only, which are compared with band-structure and experimental results. Clusters which include S2 anion pairs, i.e., [M(S2)6]10-, yield reasonable results, while for the smaller clusters [MS6]4-, even convergence could not be achieved. Our further investigation includes (i) the pressure dependence of EQ and in FeS2; (ii) the concentration dependence of EQ in the solid solutions FexCo1-xS2 (x=0.01,0.25,0.5,0.75); (iii) the sign of the nuclear-quadrupole coupling constant e2qQ, which was found to be negative except for ZnS2; (iv) the various contributions to the electric-field gradient (EFG) tensor (in FeS2 the main contribution arises from the valence shell, and proceeding from FeS2 to ZnS2 in the pyrite series, the valence contribution continuously decreases, and in the d10 system ZnS2 only a small and positive lattice EFG is left); (v) the interpretation of the independence of the Mössbauer line intensity ratio from the single-crystal orientation with respect to the beam on the basis of our calculated EFG tensor.