Quantum framework for describing retarded and nonretarded molecular interactions in external electric fields