Theoretical studies of atom-atom, atom-photon and photon-photon entanglement