We study the modulational instability of periodic traveling waves for a class of Hamiltonian systems in one spatial dimension. We examine how the Jordan block structure of the associated linearized operator bifurcates for small values of the Floquet exponent to derive a criterion governing instability to long wavelengths perturbations in terms of the kinetic and potential energies, the momentum, the mass of the underlying wave, and their derivatives. The dispersion operator of the equation is allowed to be nonlocal, for which Evans function techniques may not be applicable. We illustrate the results by discussing analytically and numerically equations of Korteweg-de Vries type. 1 The requirement that the equation is in one spatial dimension merely enters in the discussion of a Pohozaev-type identity, which is to avoid inversion of a linearized operator; see Lemma 9. 2 Note, however, that the approach in [51,52], for instance, realizing the Evans function as a regularized Fredholm determinant may be more generally applicable than the standard ODE-based formulation.