Rulings and Medical Benefits of Breastfeeding in Islam
Question

Is providing breast milk (mother/wet nurse) to an infant too young to live on solid foods a required duty?
Praise be to Allah.Breastfeeding is the right of the child
If the infant needs to be breastfed, then breast milk must be provided for him. 
It says in al-Mawsu’ah al-Fiqhiyyah (22/239): 
“There is no difference of opinion among the jurists that it is obligatory to breastfeed an infant so long as he needs that and he is at the age for breastfeeding. 
Breastfeeding is a proven right of the infant, according to the rulings of the Shari’ah, and must be provided for him by the one whose duty it is to do so. The jurists clearly stated that breastfeeding is the right of the child. 
They explained the reason for that as being that breastfeeding for an infant is like maintenance for an adult. 
What they said is true and is indicated by the Quran. Allah says (interpretation of the meaning): 
“but the father of the child shall bear the cost of the mother’s food and clothing on a reasonable basis.” [Al-Baqarah 2:233]
Allah has enjoined upon the father to spend on the woman who nurses his child, because nutrition reaches the child via the nurse through breast milk. So spending on the nurse is in fact spending on him.

It says in Sharh Muntaha al-Iradat: 
“The one who is obliged to spend on the infant, whether male or female, is obliged to spend on the child’s nurse, because the child is nourished by the milk produced by the nurse, and that can only happen if she is nourished. So it is obligatory to spend on the nurse because this is in fact spending on the child.” (Al-Mufassal fi Ahkam al-Marah, 9/464) 
Effects of breastfeeding in establishing the prohibition on marriage
The scholars unanimously agree on the effects of breastfeeding in establishing the prohibition on marriage and on making the child the mahram of the woman who breastfeeds him, and making it permissible to look at her and be alone with her, but it does not make it obligatory to spend on the person, or make him an heir or a guardian in cases of marriage. 
The reason for this mahram relationship is obvious, because when the infant is nourished by the milk of this woman, his flesh grows on that, so it is as if he is her own child. 
Hence the scholars regarded it as makruh to appoint a disbelieving woman or an immoral woman as a wet-nurse, or a woman who was suffering from a contagious disease, because it may pass to the child. 
They regarded it as mustahabb to choose a wet-nurse who was of good character and morals, because breastfeeding changes the child’s nature. 
It is better if no one breastfeeds the child but his mother, because that is more beneficial, and that may be obligatory for her if the child will not accept the breast of anyone else. 
Doctors encourage giving the mother’s milk, especially in the early months. 
The wisdom of Allah in creating the nourishment of the child in his mother’s milk has been proven through scientific and medical research. 
Medical benefits of breastfeeding 
Breastfeeding brings great benefits. Allah has enjoined breastfeeding in His Book, when He said (interpretation of the meaning): 
“The mothers shall give suck to their children for two whole years, (that is) for those (parents) who desire to complete the term of suckling.” [Al-Baqarah 2:233]
So Allah has stated the child’s right to be breastfed. 
Fourteen hundred years after this verse was revealed, international organizations such as the World Health Organization have issued statement after statement calling on mothers to breastfeed their children, whereas Islam enjoined that fourteen centuries ago. 
The benefits of breastfeeding for the child include the following: 

The mother’s milk is sterile, containing no germs. 
The mother’s milk cannot be imitated by any milk prepared from the milk of cows, goats or camels. It is composed in such a way as to meet the child’s needs day after day, from birth until weaning. 
The mother’s milk contains sufficient amounts of protein and sugar that suit the infant completely, whereas the proteins in cow’s, goat’s and buffalo’s milk are difficult for the child’s stomach to digest, because they are suited to the offspring of those animals. 
The development of children who are breastfed is faster and more complete than that of children who are bottle-fed. 
The psychological and emotional bond between the mother and her child. 
The mother’s milk contains various elements that are essential to the child’s nourishment, in the right amounts and formats needed by his body, and in a form that is suited to his ability to digest and absorb.  The nourishing content of the milk is not fixed; it changes day by day according to the child’s needs. 
The mother’s milk is kept at a suitable temperature that meets the child’s needs, and can be given to him at any time. 
Breastfeeding is a natural means of contraception for the mother, and is free of the complications that may accompany use of birth control pills, the coil (IUD) or injections. (From Tawdih al-Ahkam, 5/107)

For more about the issues related to breastfeeding, please see this section: Breastfeeding.
And Allah knows best.