The messenger of Allah said : “Allah the Almighty is good and accepts only that which is good. Allah has commanded the faithful to do that which he commanded the messengers, and the Almighty has said: “O ye messengers ! Eat of the good things and do right”. And Allah the Almighty has said : “O ye who believe! Eat of the good things wherewith We have provided you” Then he mentioned [the case of] a man who, having journeyed far, is dishevelled and dusty and who spreads out his hands to the sky [saying] : “O Lord! O Lord!” – while his food is unlawful, his drink unlawful, his clothing unlawful, and he is nourished unlawfully, so how can he be answered!”
Related by Muslim.