There is an obligation to redeem the captive long established in Jewish tradition. And while we welcome home with gladness and relief the man formerly known as Gilad Shalit (for how could he be the same person after 5 years in a dungeon?) we mourn because his freedom comes at a high price indeed. It is said that The Almighty prays that Mercy should overcome Justice, and today is a day when that prayer is answered in the realm of human beings.
Rabbi Avi Weiss has written a moving and eloquent post which you can read here. I can’t add much to what he says, other than Welcome home, brother Gilad.