Theory of excitonic couplings in dielectric media