Allah, may He be glorified, tells us that the Angel of death takes the souls of the sons of Adam, as He says (interpretation of the meaning): “Say: "The angel of death, who is set over you, will take your souls, then you shall be brought back to your Lord."” [as-Sajdah 32:11].
With regard to the souls of animals and birds, there is no text that speaks about them in the Qur’an or saheeh Sunnah, as far as we know. Rather what has been narrated concerning that is a hadeeth that is not sound (saheeh). This is a report that was narrated by al-‘Aqeeli in ad-Du‘afa’: “The lifespan of all animals, lice, fleas, locusts, horses and mules, all of them, cattle and so on, their lifespans are all connected to their tasbeeh. When their tasbeeh comes to an end, Allah takes their souls, and the Angel of death has nothing to do with that.” Al-Albaani said in as-Silsilah ad-Da‘eefah (4/188): It is mawdoo‘ (fabricated).
Hence some of the scholars said that the Angel of death is the one who takes the souls of all creatures, whilst others said that Allah takes their souls Himself and causes their life to cease.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) is of the view that asking about that is unnecessary. He (may Allah have mercy on him) was asked: Is the Angel of death appointed to take the souls of animals?
What would you think if I said that the Angel of death is or is not appointed to take the souls of animals; what benefit is there in knowing this? Did the Sahaabah ask the Messenger (blessings and peace of Allah be upon him) about that, when they were more eager than others to seek knowledge, and the Messenger was more able than others to answer, yet despite that they did not ask? Rather Allah, may He be glorified and exalted) says (interpretation of the meaning): “Say: ‘The angel of death, who is set over you, will take your souls, then you shall be brought back to your Lord.’” [as-Sajdah 32:11]. He (the Angel of death) is appointed to take the souls of the sons of Adam; with regard to the souls of creatures other than the sons of Adam, nothing is proven. And Allah knows best.
But the most important thing to say in response to this question is that man should not go to extremes (in asking questions). The Prophet (blessings and peace of Allah be upon him) said: “Those who go to extremes (in their words and deeds) are doomed.” So do not ask about things in which there is no benefit. By Allah, if there were any benefit in our knowing whether the Angel of death takes the souls of other creatures, Allah, may He be glorified and exalted, would have told us about it, either in the Qur’an or Sunnah, or Allah would have caused someone to ask the Messenger about that. Hence the Sahaabah would rejoice when a Bedouin came from the desert to ask about something that they might feel too shy to ask the Messenger about.
The point is, for you and anyone else who is listening, that delving deeply into such matters is wrong because the Messenger said: ““Those who go to extremes (in their words and deeds) are doomed.” And on one occasion he said: “Those who go to extremes (in their words and deeds) are doomed, those who go to extremes (in their words and deeds) are doomed, those who go to extremes (in their words and deeds) are doomed”, three times. With regard to such matters of the unseen, you should take what has been proven and leave that which has not been mentioned… With regard to matters of the unseen, we should take that which has been proven to us, and as for the rest, we should keep quiet about it; if it was important for us, or if there were any interest to be served by knowing it, Allah would have explained it. Allah, may He be exalted, said to the Messenger (blessings and peace of Allah be upon him):
“And We have also sent down unto you (O Muhammad SAW) the reminder and the advice (the Quran), that you may explain clearly to men what is sent down to them”
The Messenger (blessings and peace of Allah be upon him) did not leave anything that we need but he explained it to us.
With regard to the fate of the souls of these animals, it was narrated by ‘Abd ar-Razzaaq in his Musannaf, by Ibn Jubayr, and by al-Bayhaqi in al-Ba‘th from Abu Hurayrah, that he said concerning the verse (interpretation of the meaning), “There is not a moving (living) creature on earth, nor a bird that flies with its two wings, but are communities like you. We have neglected nothing in the Book, then unto their Lord they (all) shall be gathered” [al-An‘aam 6:38]: All creatures will be gathered on the Day of Resurrection, animals, beasts, birds and everything. Then Allah’s justice on that day will reach such an extent that Allah will settle the score for the hornless animal with the horned one. Then He will say, ‘Be dust,’ at which point the disbeliever will say: ‘Would that I were dust!’ [an-Naba’ 78:40].
(Source - Islam Q&A)