We set up the framework for the calculation of electric dipole moments (EDMs) of light nuclei using the systematic expansion provided by chiral effective field theory (EFT). We take into account parity (P ) and time-reversal (T ) violation which, at the quark-gluon level, originates from the QCD vacuum angle and dimension-six operators capturing physics beyond the Standard Model. We argue that EDMs of light nuclei can be expressed in terms of six low-energy constants that appear in the P -and T -violating nuclear potential and electric current. As examples, we calculate the EDMs of the deuteron, the triton, and 3 He in leading order in the EFT expansion.