In this work we discuss the application of nonequilibrium Green functions theory to atomic and molecular systems with the aim to study charge and energy transport in these systems. We apply the Kadanoff-Baym equations to atoms and diatomic molecules initially in the ground state. The results obtained for the correlated initial states are used to analyze variational energy functionals of the Green function which are shown to perform very well. We further show an application of the Kadanoff-Baym equations to a molecule exposed to an external laser field. Finally we discuss the connection between nonequilibrium Green function theory and time-dependent density-functional theory with the aim to develop better density functionals in order to treat larger systems than those attainable with the nonequilibrium Green function method.