يَا أَيُّهَا الرُّسُلُ كُلُوا مِنَ الطَّيِّبَاتِ وَاعْمَلُوا صَالِحًا (0 messengers, eat from the good things and act, righteously - 23:51.) The word means pure and good things. Since things which are forbidden under the Islamic laws are neither pure nor desirable for people who are gifted with common sense, it follows that the word طَیِّبَات refers only to the things which are permitted under the Islamic Shari'ah and which are not only good in appearance, but also pure in their intrinsic nature. This verse also tells us that all the prophets were enjoined by Allah to do two things - eat food which is clean and permissible under Shari’ ah, and to do good deeds, and considering that these injunctions have been addressed to prophets who are impeccable in any case, it is necessary that their followers should strive hard to mould their lives according to these injunctions. This in fact is the real meaning of this verse.
Scholars have expressed the view that the Juxtaposition of these two commands points to the fact that the consumption of lawful food has a very important bearing on human actions and when a person takes lawful food only, a divine guidance takes his actions along the path of righteousness. But if the food is unlawful, then serious obstacles will prevent the accomplishment of good deeds in spite of his best intentions. According to a hadtth, people travel long wearing miles and are covered with dust and they pray to Allah with hands upraised calling out "0 Lord, 0 Lord!" But since they eat forbidden things and their clothes are also made from forbidden material, there is little hope of their prayers being granted. (Qurtubi) Thus it is evident that a person hoping that his worship will get him the pleasure of Allah or that his prayers will be granted by Him must pay scrupulous attention to what he eats and must, at all times, avoid eating unlawful things.