Devarim / Deuteronomy 24:13 · Pshat
הָשֵׁב תָּשִׁיב לוֹ אֶת־הַעֲבוֹט כְּבֹא הַשֶּׁמֶשׁ וְשָׁכַב בְּשַׂלְמָתוֹ וּבֵרֲכֶךָּ וּלְךָ תִּהְיֶה צְדָקָה לִפְנֵי יְהוָה אֱלֹהֶיךָ׃
You shall surely return the pledge to him when the sun goes down, so that he may sleep in his garment and bless you, and it shall be righteousness for you before the Eternal your Almighty.
Pshat פְּשָׁט
It will count for you
You lent money and took an item as a pledge, and the debtor is cold at night without it. The law is on your side. But what do you gain if you return it for the night?
Rashi: a night garment is returned for the night, a day garment in the morning. Even if the poor man gives no thanks, it will be righteousness for you. Ibn Ezra: weigh your fellow on honest scales, as yourself. Kli Yakar cites King Monobaz: righteousness is stored where no other hand can reach.
How Rashi, Ibn Ezra, and Kli Yakar explain it
Rashi When the sun goes down
If it is a night garment. And if it is a day garment, return it in the morning. And it is already written in the portion "Mishpatim": "return it to him by sundown" (Shemot / Exodus 22:25): all day return it to him, and at sundown take it.
Rashi And bless you
And if he does not bless you, still "it shall be righteousness for you."
Ibn Ezra Shall be righteousness (צְדָקָה)
Meaning: that you weigh your fellow on just scales (צֶדֶק), as yourself, so that he sleeps with his pledge. And in the view of the translators, there are places where "justice" (צֶדֶק) and "righteousness" (צְדָקָה) differ.
Kli Yakar It shall be righteousness for you
And by its plain meaning the verse teaches here a precious thing. As King Monobaz said, who gave away his treasures, and so on: "My fathers stored up for others, and I stored up for myself, as it says: 'and it shall be righteousness for you.' My fathers stored up where the hand rules, and I stored up where the hand does not rule, as it says: 'Justice and judgment are the foundation of Your throne' (Tehillim / Psalms 89:15)" (Bava Batra 11a).
And one depends on the other. Righteousness lies before the Eternal, at the foundation of His throne, so it is yours and will not go to strangers: a person's hand does not reach there. That is why it says "and it shall be righteousness for you," and not for others. And the verse gave the reason: righteousness lies "before the Eternal your Almighty," at the foundation of His throne, and who will go up to heaven to take it from your hands?
Takeaway
A pledge (עֲבוֹט) is an item a lender takes from a debtor. If it is a garment the poor man sleeps in, it must be returned for the night (Devarim / Deuteronomy 24:12–13, Shemot / Exodus 22:25–26).
צֶדֶק ("justice") and צְדָקָה ("righteousness," later "charity") come from one root צ־ד־ק. Ibn Ezra reads the first sense here: honest scales.
The "translators" (הַמַּעְתִּיקִים) in Ibn Ezra are those who translated Scripture into other languages.
Kli Yakar takes the story of King Monobaz from the Talmud. It is given in full at the Drash level.