The magnetic properties of disordered graphene and irradiated graphite are systematically studied using a combination of mean-field Hubbard model and first-principles calculations. By considering large-scale disordered models of graphene, I conclude that only single-atom defects can induce ferromagnetism in graphene-based materials. The preserved stacking order of graphene layers is shown to be another necessary condition for achieving a finite net magnetic moment of irradiated graphite. Ab initio calculations of hydrogen binding and diffusion and of interstitial-vacancy recombination further confirm the crucial role of stacking order in pi-electron ferromagnetism of proton-bombarded graphite.