I vaguely remember reading in the Torah some laws regarding the proper restitution when one person's livestock injures or kills someone else's livestock, but as far as I can recall, it was more related to what we might call property damage, as opposed to the animal having done something morally wrong.
Does Jewish law and/or scripture suggest that the actions of animals have moral significance? Can animals be evil/sinful or good/righteous?
There are inferences in scripture that can be interpreted that actions of animals have moral value. And even when scripture speaks of their actions not having moral value, it puts them on the same level as humans who don't have moral value.
Genesis 6 11 And the earth was corrupt before God, and the earth was filled with violence. יב וַיַּרְא אֱלֹהִים אֶת-הָאָרֶץ, וְהִנֵּה נִשְׁחָתָה: כִּי-הִשְׁחִית כָּל-בָּשָׂר אֶת-דַּרְכּוֹ, עַל-הָאָרֶץ. {ס} 12 And God saw the earth, and, behold, it was corrupt; for all flesh had corrupted their way upon the earth. {S} יג וַיֹּאמֶר אֱלֹהִים לְנֹחַ, קֵץ כָּל-בָּשָׂר בָּא לְפָנַי--כִּי-מָלְאָה הָאָרֶץ חָמָס, מִפְּנֵיהֶם; וְהִנְנִי מַשְׁחִיתָם, אֶת-הָאָרֶץ. 13 And God said unto Noah: 'The end of all flesh is come before Me; for the earth is filled with violence through them; and, behold, I will destroy them with the earth.
"All flesh had become corrupted." Since Hashem had already a few verses earlier talked about the evils of mankind, Rashi says that the rest that are included with "all flesh" must be the animal kingdom.
for all flesh had corrupted: Even cattle, beasts, and fowl would mate with those who were not of their own species. — [from Tan. Noach 12] כי השחית כל בשר: אפילו בהמה חיה ועוף נזקקין לשאינן מינן:
For those that would say that this means that animals became corrupted without doing evil, we need to define what evil is, or more clearly, what sinning is. According to Hovoth Halevavoth (as well as others) one that understands cannot sin, nor can they perform a miswah
Hovoth haLevavoth Part 2
A person who has lost his understanding, loses all the excellencies of a human being and is exempt from the mitzvot (precepts), and reward and punishment.
If you tell me that regardless of this, Rashi doesn't hold this opinion, and that what Rashi is saying is that the animals became corrupt without knowing what they were doing, i tell you that indeed Rashi is claiming that it was because of this morally wrong behavior they were punished, just as the fruit trees were
Genesis 1:11 with Rashi
11And God said, "Let the earth sprout vegetation, seed yielding herbs and fruit trees producing fruit according to its kind in which its seed is found, on the earth," and it was so.
fruit trees: That the taste of the tree should be like the taste of the fruit. It [the earth] did not do so, however, but“the earth gave forth, etc., trees producing fruit,” but the trees themselves were not fruit. Therefore, when man was cursed because of his iniquity, it [the earth] too was punished for its iniquity (and was cursed-not in all editions). - [from Gen. Rabbah 5:9] עץ פרי: שיהא טעם העץ כטעם הפרי, והיא לא עשתה כן, אלא (פסוק יב) ותוצא הארץ עץ עושה פרי, ולא העץ פרי, לפיכך כשנתקלל אדם על עונו נפקדה גם היא על עונה ונתקללה:
If a tree can have iniquity, as a man can have iniquity, then even the moreso an animal! This explains why God felt justified in killing the animals in the flood as well, otherwise you have a God that punishes the innocent of the world. We always say that Noah was saved because he was the most righteous man, i think it's also fair to say that the animals were the saved were also the most righteous of their generation.
Numbers 22: כח וַיִּפְתַּח יְהוָה, אֶת-פִּי הָאָתוֹן; וַתֹּאמֶר לְבִלְעָם, מֶה-עָשִׂיתִי לְךָ, כִּי הִכִּיתַנִי, זֶה שָׁלֹשׁ רְגָלִים. 28 And the LORD opened the mouth of the ass, and she said unto Balaam: 'What have I done unto thee, that thou hast smitten me these three times?' כט וַיֹּאמֶר בִּלְעָם לָאָתוֹן, כִּי הִתְעַלַּלְתְּ בִּי; לוּ יֶשׁ-חֶרֶב בְּיָדִי, כִּי עַתָּה הֲרַגְתִּיךְ. 29 And Balaam said unto the ass: 'Because thou hast mocked me; I would there were a sword in my hand, for now I had killed thee.' ל וַתֹּאמֶר הָאָתוֹן אֶל-בִּלְעָם, הֲלוֹא אָנֹכִי אֲתֹנְךָ אֲשֶׁר-רָכַבְתָּ עָלַי מֵעוֹדְךָ עַד-הַיּוֹם הַזֶּה--הַהַסְכֵּן הִסְכַּנְתִּי, לַעֲשׂוֹת לְךָ כֹּה; וַיֹּאמֶר, לֹא. 30 And the ass said unto Balaam: 'Am not I thine ass, upon which thou hast ridden all thy life long unto this day? was I ever wont to do so unto thee?' And he said: 'Nay.' לא וַיְגַל יְהוָה, אֶת-עֵינֵי בִלְעָם, וַיַּרְא אֶת-מַלְאַךְ יְהוָה נִצָּב בַּדֶּרֶךְ, וְחַרְבּוֹ שְׁלֻפָה בְּיָדוֹ; וַיִּקֹּד וַיִּשְׁתַּחוּ, לְאַפָּיו. 31 Then the LORD opened the eyes of Balaam, and he saw the angel of the LORD standing in the way, with his sword drawn in his hand; and he bowed his head, and fell on his face. לב וַיֹּאמֶר אֵלָיו, מַלְאַךְ יְהוָה, עַל-מָה הִכִּיתָ אֶת-אֲתֹנְךָ, זֶה שָׁלוֹשׁ רְגָלִים; הִנֵּה אָנֹכִי יָצָאתִי לְשָׂטָן, כִּי-יָרַט הַדֶּרֶךְ לְנֶגְדִּי. 32 And the angel of the LORD said unto him: 'Wherefore hast thou smitten thine ass these three times? behold, I am come forth for an adversary, because thy way is contrary unto me;
Bilam is on his way to curse the children of Israel. It says that God opened up the mouth of the donkey, not that God blessed it with divine intelligence, it implies that God simply allowed the donkey to speak its own thoughts. We can argue all day if this is metaphorical or not. But either way, when the Angel finally reveals itself, its first priority is to bring up how the donkey was abused, rather than to talk to Bilaam about the whole cursing Israel thing.
For those who ask how is this moral? The donkey sees the angel while his master does not, and the donkey knows that if he approaches the angel his master would die, but if he goes against his masters wishes the master will beat him. But the donkey struggled with what he should do, and decided to heed the angel of God, rather than his master. He did the moral thing, which is why he is innocent of his masters beating, and also why the angel takes up his cause, for the donkey made the correct moral judgment.
Yonah Chapter 4 י וַיֹּאמֶר יְהוָה--אַתָּה חַסְתָּ עַל-הַקִּיקָיוֹן, אֲשֶׁר לֹא-עָמַלְתָּ בּוֹ וְלֹא גִדַּלְתּוֹ: שֶׁבִּן-לַיְלָה הָיָה, וּבִן-לַיְלָה אָבָד. 10 And the LORD said: 'Thou hast had pity on the gourd, for which thou hast not laboured, neither madest it grow, which came up in a night, and perished in a night; יא וַאֲנִי לֹא אָחוּס, עַל-נִינְוֵה הָעִיר הַגְּדוֹלָה--אֲשֶׁר יֶשׁ-בָּהּ הַרְבֵּה מִשְׁתֵּים-עֶשְׂרֵה רִבּוֹ אָדָם, אֲשֶׁר לֹא-יָדַע בֵּין-יְמִינוֹ לִשְׂמֹאלוֹ, וּבְהֵמָה, רַבָּה. {ש} 11 and should not I have pity on Nineveh, that great city, wherein are more than sixscore thousand persons that cannot discern between their right hand and their left hand, and the many animals as well?'
What is interesting about God's hesitancy about destroying Ninweh is that he compares the animals to the humans on the same level. And he also does this earlier, in terms of repenting.
Jonah Chapter 3
ז וַיַּזְעֵק, וַיֹּאמֶר בְּנִינְוֵה, מִטַּעַם הַמֶּלֶךְ וּגְדֹלָיו, לֵאמֹר: הָאָדָם וְהַבְּהֵמָה הַבָּקָר וְהַצֹּאן, אַל-יִטְעֲמוּ מְאוּמָה--אַל-יִרְעוּ, וּמַיִם אַל-יִשְׁתּוּ. 7 And he caused it to be proclaimed and published through Nineveh by the decree of the king and his nobles, saying: 'Let neither man nor beast, herd nor flock, taste any thing; let them not feed, nor drink water; ח וְיִתְכַּסּוּ שַׂקִּים, הָאָדָם וְהַבְּהֵמָה, וְיִקְרְאוּ אֶל-אֱלֹהִים, בְּחָזְקָה; וְיָשֻׁבוּ, אִישׁ מִדַּרְכּוֹ הָרָעָה, וּמִן-הֶחָמָס, אֲשֶׁר בְּכַפֵּיהֶם. 8 but let them be covered with sackcloth, both man and beast, and let them cry mightily unto God; yea, let them turn every one from his evil way, and from the violence that is in their hands. ט מִי-יוֹדֵעַ יָשׁוּב, וְנִחַם הָאֱלֹהִים; וְשָׁב מֵחֲרוֹן אַפּוֹ, וְלֹא נֹאבֵד. 9 Who knoweth whether God will not turn and repent, and turn away from His fierce anger, that we perish not?' י וַיַּרְא הָאֱלֹהִים אֶת-מַעֲשֵׂיהֶם, כִּי-שָׁבוּ מִדַּרְכָּם הָרָעָה; וַיִּנָּחֶם הָאֱלֹהִים, עַל-הָרָעָה אֲשֶׁר-דִּבֶּר לַעֲשׂוֹת-לָהֶם--וְלֹא עָשָׂה. 10 And God saw their works, that they turned from their evil way; and God repented of the evil, which He said He would do unto them; and He did it not.
According to the grammar of these verses, both man and beast wear sack cloth, all cry out onto God, all repent from their evil ways, and therefore all are given forgiveness from the punishment God was planning on bringing upon them.
For those who would say that it was only the people who repented because verse 8 says וְיָשֻׁבוּ אִישׁ מִדַּרְכּוֹ הָרָעָה i say that these are the words of the king of Ninweh! "by the decree of the king and his nobles, saying..." (Verse 7) God does not make a distinction between man and beast, for verse 10 says י וַיַּרְא הָאֱלֹהִים אֶת-מַעֲשֵׂיהֶם, כִּי-שָׁבוּ מִדַּרְכָּם הָרָעָה; And God saw their works, that they turned from their evil way...
So yes, if you want to believe in the words of the king of Ninweh, the animals did not repent of their evil ways, but do not mix his words with being the words of God.