Phonon-Assisted Exciton Formation and Relaxation: Bulk and Two-Dimensional Systems