Wikipedia has a pretty useful article
http://en.wikipedia.org/wiki/Sacrifice
Here's the history in a nutshell:
(1) The sacrifice is construed as a gift to the gods, for their benefit...in a similar way that food offerings to the dead are viewed as for the benefit of the deceased. Burning the sacrifice would produce smoke that the wind would carry to the gods. The statements in the OT that sacrifices give a "pleasing odor" to Yahweh is a remnant of this view. Such gifts are made to appease the wrath of the gods (who bring both blessing and calamity) and to maintain order on the earth. On this view, the gods are viewed more as personified forces of nature and are unpredictable. This typifies sacrifice in many polytheistic and pre-OT contexts.
(2) In a later stage, the sacrifice is construed as a legal expiation for the actions that in the older view would provoke the wrath of the gods. Expiation is the means through which a guilty party can absolve his guilt by transferring it to an innocent being (e.g. a scapegoat) and sacrificing it. This view may involve ideas of theodicy and posit the gods or God as a divine judge who demand justice and punishment. Here the gods are viewed more within the cultural institutions of law and justice, and less as irrational and unpredictable forces. This typifies sacrifice in most of the OT.
(3) Then in a later stage, a group that views themselves as innocent but undergoing unjust persecution by others may view themselves in the role of the sacrificial victim, and view themselves as expiating or atoning for the crimes committed by others. This happened during the Babylonian exile by the group that Deutero-Isaiah was writing for, and it occurred during the Maccabean persecution under Antiochus Epiphanes. In both cases, the exiles and the martyrs believed that they bore the guilt for the rest of Israel.
(4) That last view then was applied, within early Christianity, to Jesus Christ in order to bring theological meaning and purpose to his crucifixion (the most heinous form of execution in the Roman world). Just like the Maccabean martyrs, Jesus was viewed as innocent and who bore the faults of others. However, owing to the universal scope of early Christianity (which drew from both Gentiles and Jews), Jesus was construed as an expiatory sacrifice for all sinners. However, there are many theological ways his sacrifice came to be understood by different writers, and not all writers even portrayed Jesus' death in such a way. The gospel writers applied all the texts in Deutero-Isaiah about expiation by the exiles to Jesus, the author of the Johannine gospel has Jesus executed at the moment the pascal lamb was sacrificed, and the passion narrative in particular draws its details from the OT descriptions of various sacrifice rituals in the Torah (such as the scarlet robe and thorns, and Pilate's handwashing scene).