Context. The key question about early protostellar evolution is how matter is accreted from the large-scale molecular cloud, through the circumstellar disk onto the central star. Aims. We constrain the masses of the envelopes, disks, and central stars of a sample of low-mass protostars and compare the results to theoretical models for the evolution of young stellar objects through the early protostellar stages. Methods. A sample of 20 Class 0 and I protostars has been observed in continuum at (sub)millimeter wavelengths at high angular resolution (typically 2 ) with the submillimeter array. Using detailed dust radiative transfer models of the interferometric data, as well as single-dish continuum observations, we have developed a framework for disentangling the continuum emission from the envelopes and disks, and from that estimated their masses. For the Class I sources in the sample HCO + 3-2 line emission was furthermore observed with the submillimeter array. Four of these sources show signs of Keplerian rotation, making it possible to determine the masses of the central stars. In the other sources the disks are masked by optically thick envelope and outflow emission. Results. Both Class 0 and I protostars are surrounded by disks with typical masses of about 0.05 M , although significant scatter is seen in the derived disk masses for objects within both evolutionary stages. No evidence is found for a correlation between the disk mass and evolutionary stage of the young stellar objects. This contrasts the envelope mass, which decreases sharply from ∼1 M in the Class 0 stage to < ∼ 0.1 M in the Class I stage. Typically, the disks have masses that are 1-10% of the corresponding envelope masses in the Class 0 stage and 20-60% in the Class I stage. For the Class I sources for which Keplerian rotation is seen, the central stars contain 70-98% of the total mass in the star-disk-envelope system, confirming that these objects are late in their evolution through the embedded protostellar stages, with most of the material from the ambient envelope accreted onto the central star. Theoretical models tend to overestimate the disk masses relative to the stellar masses in the late Class I stage. Conclusions. The results argue in favor of a picture in which circumstellar disks are formed early during the protostellar evolution (although these disks are not necessarily rotationally supported) and rapidly process material accreted from the larger scale envelope onto the central star.