  We study dynamics of isolated quantum many-body systems under periodic
driving. We consider a driving protocol in which the Hamiltonian is switched
between two different operators periodically in time. The eigenvalue problem of
the associated Floquet operator maps onto an effective hopping problem in
energy space. Using the effective model, we establish conditions on the
spectral properties of the two Hamiltonians for the system to localize in
energy space. We find that ergodic systems always delocalize in energy space
and heat up to infinite temperature, for both local and global driving. In
contrast, many-body localized systems with quenched disorder remain localized
at finite energy. We argue that our results hold for general driving protocols,
and discuss their experimental implications.
