אֱלֹהִ֖ים לֹ֣א תְקַלֵּ֑ל וְנָשִׂ֥יא בְעַמְּךָ֖ לֹ֥א תָאֹֽר׃
不可咒詛審判官,也不可詛咒你百姓中的首領。
Rashi
אלהים לא תקלל THOU SHALT NOT EXECRATE GOD — Here you have the prohibition of blasphemy (the penalty being stated in Leviticus 24:16) and the prohibition of cursing a judge (who is also termed אלהים, cf. Exodus 22:7) (cf. (Mekhilta and Sanhedrin 66a).
Ramban
THOU SHALL NOT CURSE ‘ELOHIM.’ Onkelos translated it as referring to a judge, that one is not to curse him if he should hold him guilty in a lawsuit. Lo takeil [Onkelos’ rendition of the Hebrew lo t’kaleil — thou shalt not curse], is the Aramaic expression for “cursing.” Thus: “Meikal l’hu (they curse him): May the Eternal cut off to the man that doeth this, him that calleth and him that answereth.”322Malachi 2:12. — Yerushalmi Shabbath III, 7. There are many similar expressions, in the language of the Talmud Yerushalmi.
Rashbam
אלוהים לא תקלל ונשיא בעמך לא תאר. The Torah again selected the most likely scenario of someone cursing people in authority. People who lose in litigation are apt to curse the judge ruling against them. We find a similar verse in Kohelet 10,20 where Solomon writes: “don’t revile a king even among your intimates.” Another verse in which the Torah refers to a spectacle arousing curses is found in Deuteronomy 21,23 where the Torah refers to the body of a judicially executed person being buried by nightfall. The reason given is that seeing such a body evokes curses against the judges who had convicted the victim.