Context. Solar cycles vary in their amplitude and shape. There are several empirical relations between various parameters linking cycle’s shape and amplitude, in particular the Waldmeier relations. Aims. As solar cycle is believed to be a result of the solar dynamo action, these relations require explanation in the framework of this theory. Here we aim to present a possible explanation of such kind. Methods. We relate the cycle-to-cycle variability of solar activity to fluctuations of solar dynamo drivers and primarily to fluctuations in the parameter responsible for recovery of the poloidal magnetic field from the toroidal one. To be specific, we develop such a model in the framework of the mean-field dynamo based on the differential rotation and α-effect. Results. We demonstrate that the mean-field dynamo based on a realistic rotation curve and nonlinearity associated with the magnetic helicity balance reproduces both qualitatively and quantitatively the Waldmeier relations observed in sunspot data since 1750 (SIDC data). The model also reproduces more or less successfully other relations between the parameters under discussion, in particular, the link between odd and even cycles (Gnevyshev-Ohl rule). Conclusions. We conclude that the contemporary solar dynamo theory provides a way to explain the cycle-to-cycle variability of solar activity as recorded in sunspots. We discuss the importance of the model for stellar activity cycles which, as known from the data of HK project, demonstrate the cycle-to-cycle variability similar to solar cycles.