Some are accustomed to recite a memorial prayer for the deceased [on Yom HaKippurim], and those close to the deceased vow to give charity to elevate the deceased's souls; because, even the deceased need atonement as stated in [Midrash] Sifrei:

"Atone for your nation", these are the living; "whom you redeemed", these are the deceased. This teaches that the deceased need atonement.

Midrash Sifrei's Wikipedia article suggests that its section on Sefer Devarim was authored by Rabbi 'Aqiva or around his lifetime (Mishnaic/Tannaitic period).

It is found in Torat Kohanim: "Atone for your nation Israel", these are the living; "whom you redeemed", these are the deceased. From here, we learn that the living redeem the deceased. Therefore, we are accustomed to mention the deceased on Yom HaKippurim and to "[donate] charity on their behalf".

Re: the quote from Midrash Tanchuma: It should be noted that further down it say: "עד כאן חדש הוא. ומכאן ואילך מן הישן". According to Salomon Buber (see here; p. 29 of the PDF), the whole first section is the addition of the Mantua edition of 1563 C.E., which added it on top of previous editions (the Constantinople 1520 C.E. edition, and the Venice 1545 C.E. edition don't have it).
– Tamir EvanOct 15 '14 at 11:34

Re: the Sifrei quote: The Midrash itself only says that the deceased too need atonement, and does so with regard to the slain person for whom there are no witnesses to testify as to the circumstances of the slaying. Dating that Midrash doesn't help, as it is others (like the "Midrash Tanchuma", or the Chazon Ovadiah Yamim Noraim mentioned by the Yalqut Yosef) who extend (a) the need of atonement to the deceased in general, and (b) the means of achieving it to reciting memorial prayers and vowing to give charity.
– Tamir EvanOct 15 '14 at 12:49

[...] The soul of a deceased person experiences great pleasure when his or her loved ones come to pray at [his or her] gravesite. These prayers provide immense benefit for the soul in the next world, thus prompting them to pray to G-d on behalf of the living.

Sefer Hasidim's Wikipedia article places its authorship "between the late 12th and early 13th centuries".