Assalamualaikum ustaz. Is it true that when a rooster crows, it is a sign that it sees an angel?
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
The question regarding when a rooster crows it sees an angel is based on a hadith narryed by Abu Hurairah RA, the Prophet PBUH said:
إِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ فَاسْأَلُوا اللَّهَ مِنْ فَضْلِهِ، فَإِنَّهَا رَأَتْ مَلَكًا، وَإِذَا سَمِعْتُمْ نَهِيقَ الحِمَارِ فَتَعَوَّذُوا بِاللَّهِ مِنَ الشَّيْطَانِ، فَإِنَّهُ رَأَى شَيْطَانًا
“When you hear the cock’s crow, ask Allah for His favor upon you for surely it has seen an angel. When you hear the bray of a donkey, seek refuge in Allah from Satan, for surely it has seen a devil.” 
In a narration of Imam Ahmad, there is an additional phrase ‘at night’,
إِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ مِنَ اللَّيْلِ، فَإِنَّمَا رَأَتْ مَلَكًا، فَسَلُوا اللهَ مِنْ فَضْلِهِ
“When you hear the crowing of a cock in the night, it has seen an angel. Ask Allah for its blessing.” 
The specialty of a Rooster (Cock)
Rasullullah PBUH made the sign of the crowing of a rooster a sign of goodness, that is the arrival of angels and we are encouraged to supplicate. This shows the speciality of a rooster.
Ibn Hajar al-Asqalani in his discussion stated: A rooster has its own specialty that isn’t possessed by any other animals, where it knows the changes of time at night. It will grow at the exact time without a miss. It will crow before and after Subuh and never miss these times. Regardless of whether the night is long or short. Hence, some Syafi’iyyah scholars issue a fatwa that it is sufficient to depend on a rooster in determining time. 
He cited the opinion of al-Dawudi who said: We learn from a rooster 5 matters:
- Its voice is melodious
- Gets up at sahur time
- The attribute of jealousy
- Have intercourse often 
The prohibition of cursing rooster
From Zaid bin Khalid al-Juhani RA, Rasullullah PBUH said:
لَا تَسُبُّوا الدِّيكَ فَإِنَّهُ يُوقِظُ لِلصَّلَاةِ
“Don’t ever curse rooster, for it wakes the people for prayer.”
Ibn Hajar al-Asqalani cited the opinion of al-Halimi, he said: The wisdom from this hadith is that all that is beneficial should not be cursed or insulted. The Prophet PBUH said: ‘A rooster wakes (people) up for prayer’ doesn’t mean that it literally calls towards prayer however, it means that it is common for a rooster to crow when the sun rises and sets. This innate characteristic is granted by Allah to it. 
The encouragement to supplicate
Ibn Hajar al-Asqalani in Fath al-Bari cited the words of ‘Iyadh:
كَانَ السَّبَبُ فِيهِ رَجَاءَ تَأْمِينِ الْمَلَائِكَةِ عَلَى دُعَائِهِ وَاسْتِغْفَارِهِمْ لَهُ وَشَهَادَتِهِمْ لَهُ بِالْإِخْلَاصِ وَيُؤْخَذُ مِنْهُ اسْتِحْبَابُ الدُّعَاءِ عِنْد حُضُور الصَّالِحين
The reason we are encouraged to supplicate when a rooster crows is in the hopes for the amin from the angel for our supplication and the angel asking for our forgiveness and their witness of our sincerity. The benefit taken from this hadith is the encouragement to supplicate in the presence of pious people.
Whereas, Syihabuddin Ahmad bin Muhammad al-Qastalani in his syarah stated: Scholars understood the meaning of the hadith is for us to supplicate to Allah SWT when we hear a rooster crow, at the same time we hope for the angel to recite amin for our supplication and istighfar. Furthermore, the angel is our witness of our sincerity and humbleness (of our weaknesses) when we are supplicating to Allah SWT. Moreover, this hadith shows us that it is sunnah to supplicate in the presence of pious people. Among the specialty of a rooster is that it knows the time even when sometimes the day is long or short. Likewise, it crows before and after Subuh time. All praise is for Allah who created it as such. 
Whilst Syeikh Syams al-Haq al-Azim Abadi in his syarah said: It is said that this hadith shows that blessings are showered in the presence of pious people and it is sunnah for us to supplicate during this time. 
To close, we state that a rooster crows when it sees an angel is true as stated by Rasullullah PBUH in a sahih hadith. Hence, we are encouraged to supplicate to Allah SWT when the angels are present in the hopes the angels recite amin for our supplication.
Lastly, may Allah SWT grant us understanding in this religion. Amin.
 Narrated by al-Bukhari, (3058), Muslim (4908), Abu Dawud, (4438) and al-Tirmizi, (3381)
 Narrated by Ahmad (8064) Syeikh Syuaib al-Arnout di dalam Takhrij al-Musnad (8764) menyatakan hadith ini sahih berdasarkan syarat al-Bukhari
 See Fath Bari, 6/353
 Narrated by Abu Dawud (5101), al-Nasaie in al-Sunan al-Kubra (10781) and Ahmad (21679). Syeikh Syuaib al-Arnout in Takhrij Zad al-Ma’ad (2/431) stated the sand of this hadith is hasan.
 See Fath Bari, 6/353
 See Irsyad al-Sari li Syarh Sahih al-Bukhari, 5/309
 See Aun al-Ma’bud, 9/238