Not only is the death of the tzaddikim an atonement for Klal Yisrael, but the death of any individual Jew is an atonement as well, for himself.
The Gemara says that there are four categories of sin, in varying levels of severity, with the more severe sins requiring more elements of teshuvah. Violating a positive commandment of the Torah requires just teshuvah, whereas violating a prohibition of the Torah requires teshuvah and suffering; sins that are of capital punishment in Beis Din, or sins that are kares, require the atonement of Yom Kippur in addition to teshuvah and suffering, whereas the sin of chilul Hashem (profaning the Name of Hashem) is not atoned for except through death, in addition to teshuvah, suffering, and Yom Kippur.
Thus, Yom Kippur, the time of atonement, does not always atone for every possible situation. If a person in the times of the Beis HaMikdash committed certain sins that required him to bring a korbon, he could not be atoned for unless he brought the korbon. Yom Kippur also does not atone for people who aren’t interested in doing teshuvah; “Yom Kippur atones only for those who return.” Yom Kippur also does not atone for sins committed between man and his friend, unless one has sought forgiveness from his friend beforehand. Yom Kippur also does not atone for the sin of chilul Hashem, as mentioned above.
The ultimate and essential kind of atonement is death. Death is the very core of atonement, and it contains a deeper kind of atonement than the atonement of Yom Kippur, as we can see from the fact that Yom Kippur alone does not atone for the sin of chilul Hashem, and it is only atoned for with death.