The pros of a deed-in-lieu include unloading your property with little hassle; not having to suffer the embarrassment of having the sheriff hold a foreclosure auction right on your front porch (which is the practice in many parts of the country); and you can reach agreement with your lender in advance as to how much money (if any) you will have to pay the lender.
In many deed-in-lieu arrangements, while the lender will agree to take the house back and cancel your loan, sometimes it comes at a cost, i.e., you will have to pay something for this. Compare this to a foreclosure, where you won't know what the house will sell for, and in many states you can be sued for the difference between what you owe and what the house sold for (called a deficiency judgment).
One more positive: Congress just extended the "forgiveness of debt" law for 2013, so in many situations you will not have to pay tax on the debt that was forgiven when the lender took the deed-in-lieu.
Compared to a foreclosure, I cannot think of any negatives by doing a deed-in-lieu. However, if a short sale is at all possible, I would opt to go that route instead of giving the deed to your lender. But whether you lose your house by way of a foreclosure or a deed-in-lieu, or enter into a short sale, your credit will be seriously impacted.