Quantum Molecular Dynamics Study of Energy Transfer of Diatomic Molecules to Solid Surfaces