Allah Almighty Says in the Noble Quran (what means):
“[As for] the thief, the male and the female, amputate their hands in recompense for what they earned [i.e. committed] as a deterrent [punishment] from Allah. And Allah is Exalted in Might and Wise.” [Quran 5:38
Because cutting off the hand is a serious matter, it should not be done for just any case of theft. A combination of conditions must be fulfilled before the hand of a thief is cut off. These conditions are as follows:
1- The thing should have been taken by stealth; if it was not taken by stealth, then the hand should not be cut off, such as when property has been seized by force in front of other people, because in this case the owner of the property could have asked for help to stop the thief.
2- The stolen property should be something of worth, because that which is of no worth has no sanctity, such as musical instruments, wine and pigs.
2- The value of the stolen property should be above a certain limit, which is three Islamic Dirhams or a quarter of an Islamic Dinar, or their equivalent in other currencies.
3- The stolen property should have been taken from a place where it had been put away, i.e., a place where people usually put their property, such as a cupboard, for example.
4- The theft itself has to be proven, either by the testimony of two qualified witnesses or by the confession of the thief twice.
5- The person from whom the property was stolen has to ask for it back; if he does not, then (the thief’s) hand does not have to be cut off.
However, Umar ibn Al-Khattab, may Allah be pleased with him, said, “Do not cut the hand of the thief who steals dates in the year of famine.”
http://www.islamweb.net/en/article/136791/the-ruling-of-theft-in-islamhttp://dailyhadith.abuaminaelias.com/2012/09/18/umar-on-justice-do-not-cut-the-hand-of-the-thief-who-steals-food-out-of-starvation/