V groove GaAs/AlGaAs quantum wires are investigated by spatially resolved photoluminescence spectroscopy using a low-temperature scanning near- field optical microscope. The spectra along the wires feature several sharp emission lines, which are understood as the emission from exciton states localized in inhomogeneities of the confining potential. It is expected that these exciton states spatially overlap and that their energies are correlated, which leads to level repulsion. The statistical analysis of the spectra in terms of autocorrelation functions clearly reveals this effect. In order to model photoluminescence rather than absorption spectra, we perform detailed simulations of exciton relaxation and luminescence kinetics in a disordered one-dimensional system, taking into account the realistic structure of the facets at the bottom of the V groove in our disorder model. Combining near- field measurements and numerical simulations we show that disorder prevents the full relaxation of excitons towards the local ground states in the dips of the disordered potential. As a consequence, luminescence from excited states is observed. We identify in the spatial and energy correlation between localized states the origin of the observed level repulsion and discuss the role played by the two facets at the bottom of the V groove in this mechanism. This analysis also highlights the relevance of the broad photoluminescence background observed in this and in analogous experiments. We propose as explanation for the origin of this broad background the strong exciton-acoustic phonon coupling that results in phonon sidebands in the spectrum of each localized state.