His body shall not remain all night upon the tree - Its exposure for the space of one day was judged sufficient. The law which required this answered all the ends of public justice, exposed the shame and infamy of the conduct, but did not put to torture the feelings of humanity by requiring a perpetual exhibition of a human being, a slow prey to the most loathsome process of putrefaction. Did ever the spiking of the heads of state criminals prevent high treason? or the gibbeting of a thief or a murderer, prevent either murder or robbery? These questions may be safely answered in the negative; and the remains of the ancient barbarism which requires these disgusting and abominable exhibitions, and which are deplored by every feeling heart, should be banished with all possible speed. In the case given in the text, God considers the land as defiled while the body of the executed criminal lay exposed, hence it was enjoined, Thou shalt in any wise bury him that day.
For he that is hanged is accursed of God - That is, he has forfeited his life to the law; for it is written, Cursed is every one who continueth not in all things that are written in the book of the law to do them; and on his body, in the execution of the sentence of the law, the curse was considered as alighting; hence the necessity of removing the accursed thing out of sight. How excellent are all these laws! How wondrously well calculated to repress crimes by showing the enormity of sin! It is worthy of remark that in the infliction of punishment prescribed by the Mosaic law, we ever find that Mercy walks hand in hand with Judgment.
He that is hanged is accursed of God - i. e. “Bury him that is hanged out of the way before evening: his hanging body defiles the land; for God‘s curse rests on it.” The curse of God is probably regarded as lying on the malefactor because, from the fact of his being hanged, be must have been guilty of a especially atrocious breach of God‘s covenant. Such an offender could not remain on the face of the earth without defiling it (compare Leviticus 18:25, Leviticus 18:28; Numbers 35:34). Therefore after the penalty of his crime had been inflicted, and he had hung for a time as a public example, the holy land was to be at once and entirely delivered from his presence. See Galatians 3:13 for Paul‘s quotation of this text and his application of it.