Electron and hole states are studied in quantum well wires (QWWs) with a rectangular cross section. A theoretical approach is developed, within which the electronic properties of a single QWW as well as of finite and infinite planar lattices of QWWs are analysed. It is demonstrated that the ratio of effective masses in the well and in the barrier influences the dispersion law of the electron motion along the QWW axis. A six-wire lattice is studied in detail. Edge states, which can be observed in optical spectra, are revealed, when the barrier heights are different inside and outside the lattice. The miniband structure is investigated for an infinite lattice of QWWs. The evolution of electron states is analysed when the number of QWWs in the lattice increases: 1 → 6 → ∞. The calculated electron-hole pair energies are in a good agreement with the experimental data on photoluminescence in the Ga 0.47 In 0.53 As/InP QWW.