All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
If what you mean is the use of a coffin for a dead person, i.e. burying him in it, then it is dislikeable to bury the dead in a coffin according to the consensus of the scholars as per the Fiqh Encyclopaedia, because this is an innovation and the will of the dead in this regard should not be fulfilled. However, it is not dislikeable to bury the dead in a coffin if there is a benefit, for instance if the dead is burnt and when there is a necessity in using the coffin because the soil is loose, flaccid or wet.
However, if you mean using the coffin in order to transport the dead to the graveyard, then the scholars are of the view that it is desirable to use a coffin when transporting the dead. Al-Buhooti from the Hanbali school said: 'It is desirable to transport the dead on a coffin, and if the dead is a woman then it is desirable to cover its coffin.'
A coffin is a wooden long box in which the dead is carried. An-Nawawi said: 'It is permissible to cover the dead woman with what conceals her like a coffin.'
Allaah Knows best.