"You should separate three cities for yourself within your land...." [Shoftim 19:2]
Any sin shares qualities with murder itself, since the abuse of energy for the purposes of evil is like the spilling of blood. However, a sin is only like accidental murder, since the true intention of every Jew, as Rambam testifies is "To fulfill all the commandments and to avoid any sins".
Furthermore, the act of sin is considered to have been done "unintentionally" for "a person does not commit a sin unless he is possessed by a spirit of folly".
The atonement for this is to study Torah, which is analogous to the escape to a city of refuge - because "the words of Torah protect". In other words, just like a city of refuge is a haven to protect accidental murderers from "avengers of the blood" (relatives of the deceased who seek revenge) so too Torah is a refuge from one's personal "avenger of the blood" - the evil inclination.
Furthermore, Torah study is effective in achieving atonement for the "spilt blood" since one's energies become re-devoted to holiness and Torah, which is described as the "Torah of life".
However, in the Messianic Era, the Cities of Refuge will fulfill a diferent purpose altogether.
Despite the perfect global refinement which will occur in the future, the first stage of the Messianic Era will not witness a total elimination of evil, since the possibility of evil occurring will still remain. Only afterwards, in the period of the resurrection, will G-d completely eliminate the existence of evil from the world, when "I will cause the spirit of impurity to depart the earth" [Zechariah 13:2].
Consequently, Cities of Refuge will be required as a mechanism to eliminate even the possibility of sin, which exists as a result of the residual evil within the world (similar to the state of the world before Adam's sin, when there was no actual evil - just the potential for sin).
This prevention of the possibility of evil will be achieved by the introduction of a new type of city of refuge, the three new cities - which allude to a new dimension of mystical knowledge, which will provide protection against even the possibility of evil.
Source: Sicha of the Lubavitcher Rebbe, Shavuot 5751