The europium compound Eu2BaCoO5 has been studied by means of Raman and x-ray absorption spectroscopies. The eigenfunctions and frequencies of the optical normal modes have been calculated from an adequate potential showing good accordance with the observed phonons. In addition to Raman allowed normal modes, several infrared and luminescence bands are observed between 10 K and 300 K. The temperature dependence of these processes has allowed us to determine the complex interrelation between these two kinds of elementary excitations. A broad luminescence band (at 2.3 eV) is tentatively attributed to electronic transitions between Co2+ 3d crystal field levels in the gap of the material. The mixing of these quasiatomic levels with apical oxygen orbitals, along the very short Co-O(2) bonds in the chains, can be the reason for the simultaneous enhancement of the intensities of the luminescence band and of the apical oxygen infrared modes through a resonant electron-phonon coupling. From the dependence of the phonon frequencies and the analysis of the extended x-ray-absorption fine structure spectra with the temperature it can be concluded that on decreasing the temperature the a-xis becomes shorter, while the other two axes remain nearly unchanged. The emission spectrum in the visible range has been observed and interpreted in the frame of the crystal-field theory. We have studied the dependence of the intensity of the electronic transitions between 4f levels of the europium ions with the temperature and the energy of the exciting light. From the behavior of the Eu3+ luminescence peaks it has been possible to determine the processes of excitation and emission, which are shown to involve lattice phonons. The crystal-field parameters of the Eu3+ ions have been calculated from the energies of the lower terms of the ion.