We have performed Full Potential Linearized Augmented Plane-Wave (FP-LAPW) calculations of the layered cerium compounds CeRhIn5 and CeIrIn5, which belong to the new, intensively investigated family of heavy fermion (HF) materials. The ground states of this compounds can be tuned between antiferromagnetism (AFM) and superconductivity (SC) by external pressure or doping. We have carried out x-ray photoelectron spectroscopy (XPS) experiments to compare measured valence band spectra with theoretical calculations. We also analyse the XPS 3d Ce spectra, to estimate the occupation of the Ce 4f shell and the hybridization between 4f and conduction electrons. We have found and discussed an influence of the lattice parameter a and the d-f interatomic hybridization effect on the ground state properties in the series of CeMIn5 compounds.