Ab initio simulations of molecular quantum dynamics and exciton-polaritons