With regards to what conditions must be fulfilled for a food to be tayyib, the Shaykh Muhammad ibn Saalih al ‘Uthaymeen (May Allaah have mercy on him) comments:
“O Messengers, eat from those foods which are tayyib and work righteous deeds.”
[Soorah al Mu-minoon (the 23rd chapter) aayah 51]
So He commanded the messengers to eat from the foods which are tayyib – and they are those which Allaah, the Mighty and Majestic, declared to be halaal (permissible) and those which were acquired in an Islaamically legislated manner.
So if Allaah did not declare it to be permissible – such as intoxicants, then it is not to be consumed.
And even if Allaah declared it to be permissible but it was acquired in a forbidden manner, then it is not to be consumed.
And I will strike two examples for that:
The first – a man eats from a sheep which has died (without being slaughtered). So this person has not eaten from the foods which are tayyib because Allaah, the Most High, declared dead meat to be forbidden. And this (meat) is forbidden in and of itself.
The second - a man steals a sheep unlawfully and slaughters it and eats from it. So the ruling upon it is that it is not tayyib and it is forbidden due to the manner in which it was obtained.
[Sharh al Arba’een an-Nawawee (p142) of Shaykh Muhammad ibn Saalih al ‘Uthaymeen (May Allaah have mercy on him) ]