We investigate excitons and trions in a two-dimensional quantum dot lattice embedded in a planar optical cavity. The strong exciton (trion)-photon coupling is described in terms of polariton quasiparticles with extremely small mass, which makes them the lightest exciton-like quasiparticles in solids. The effect of disorder is also discussed. Furthermore, one electron is added into each dot. Such a "spin lattice’’ can be used for quantum information processing and we show that by using exciton detuning a conditional phase shift gate with a high fidelity can be obtained. Finally, we investigate exciton-photon quantum phase transitions in a planar lattice of one-mode cavities containing one quantum dot. We demonstrate that by controlling exciton- and photon-hopping energies a very rich scenario of coupled fermionic-bosonic quantum phase transitions appears.