Based on a functional-integral formalism, a generalization of the self-energy-functional theory (SFT) is proposed which is applicable to systems of interacting electrons with disorder. Similar to the pure case without disorder, a variational principle is set up which gives the physical (disorder) self-energy as a stationary point of the (averaged) grand potential. Although the resulting self-energy functional turns out to be more complicated, the formal structure of the theory can be retained since the unknown part of the functional is universal. This allows to construct nonperturbative and thermodynamically consistent approximations via searching for a stationary point on a restricted domain of the functional. The theory and the possible approximations are worked out for models with local interactions and local disorder. This results in a derivation of different mean-field approaches and various cluster extensions, including well-known concepts as the statistical dynamical mean-field theory, the molecular coherent-potential approximation and the dynamical cluster approximation. Due to the common formal framework provided by the SFT, one achieves a general systematization of dynamical approaches, i.e. approaches based on the spectrum of oneparticle excitations. New mean-field and new cluster schemes naturally appear in this framework and complement the existing ones. Their prospects for future applications are discussed.