We present an exact decomposition of the complete wave function for a system of nuclei and electrons evolving in a time-dependent external potential. We derive formally exact equations for the nuclear and electronic wave functions that lead to rigorous definitions of a time-dependent potential energy surface (TDPES) and a time-dependent geometric phase. For the H(2)(+) molecular ion exposed to a laser field, the TDPES proves to be a useful interpretive tool to identify different mechanisms of dissociation.