All the Banu Umayyah [lit. Sons of Umayyah] including Yazid's son have been cursed in Ziyarat Ashura. However, according to some historians Yazid's son and a few other people from the same clan rendered some good humanitarian services to the people of their time. Apparently, the cursing which is found in Ziyarat Ashura is opposed to the good deeds they have done. This begs the question: Why are they cursed? In order to make this point clear and to demonstrate that there is no contradiction between the two, we must say: The name 'Banu Umayyah' refers to and includes all those people who were intellectually and practically coordinated with Banu Umayyah to oppose the Ahlul-Bayt of the Holy Prophet (s). That is to say, all those who were opposed to the imamate (leadership) of the Imams (a.s.) and were directly or indirectly involved in committing crimes against them or were just happy with the atrocities unleashed upon the Imams are included. This point is clearly inferred from the statements preceding and following the curse. That is because the context of Ziyarat Ashura indicates that those cursed are people who usurped the caliphate and reclined on its throne through illegitimate ways. They were the ones who made every effort to turn off the light of Allah, so they left no stone unturned to express their enmity to the family of the Holy Prophet (s). It also includes those individuals who backed these people or consented to their crimes. Thus, the good and noble people from Bunu Umayyah are categorically excluded. That is, the curse in Ziyarat Ashura does not include the good doers from Banu Umayyah in the first place.
The above question has two aspects that need to be dealt with: One, investigation into the life of Yazid's son in terms of his beliefs and conducts, another, understanding the meaning of "cursing all Banu Umayyah" in Ziyarat Ashura.
When it comes to Yazid's son, we must say that: There is no doubt that Muawiyah bin Yazid's abdication from the throne was a praiseworthy action on his part. Indeed, he understood very rightly that the throne had been usurped and that he was not the right person to recline on it. However, it does not mean that we must be certain that Muawiyah bin Yazid repented with all the conditions of repentance (including compensation of all the committed injustice and oppressions) and was bestowed with divine blessing. His abdication from power also does not mean that he was not included in the curse of Allah. There is no doubt that usurping the caliphate, for a short time though, is a great sin and if this sin has to be forgiven, it should bear certain conditions. For example, Imam Sajjad (a.s.) said about Umar bin Abdul Aziz that the Imam said to Abdullah bin 'Ata: "He (Umar bin Abdul Aziz) will die and people on earth will cry on his death while the dwellers of the heavens shall curse him." That is because he occupied a position to which he had no right and which he did not deserve, though he had done a lot of good and positive things. Indeed, we cannot say for sure that Muawiyah bin Yazid or Umar bin Abdul Aziz is not included in the divine grace. In any case, God alone knows about their fate but it is undeniable that some people from the Banu Umayyah tribe were among the sincere and devout Shiites like Khalid bin Aas, Abul Aas bin Rabi', Sa'd al-Khair and a few others. Having said that, we accept that there are people in Banu Umayyah who do not deserve to be cursed by Allah. Now, we shall take up the discussion with the second aspect of the question i.e. the meaning of 'Banu Umayyah' in Ziyarat Ashura.
The Meaning of Cursing All the Banu Umayyah
Before we give an explanation on the meaning of cursing the Banu Umayyah, it is necessary to mention that it is the Holy Quran's firm and unchangeable principle that no one is punished and chastised for the sin committed by another person except for when he may have had a role in the sin or when he may have consented to it or allowed it in which case he is punished for having committed these same sins not other sins. Hazrat Saleh's camel was hamstrung by an individual from the Thamud tribe but the Quran ascribes that sin to all the people Thamudand considers them guilty and blameworthy. That was because they consented to this sin and, as said by Imam Ali (a.s.), Allah held all of the Thamud in punishment because all of them joined him by their acquiescing in their consenting to it.
In other words, according to the Quran the criterion for being a part of a group or a clan is the intellectual and practical collaboration with that group. For example, God does not consider Noah's son to be from Noah's family. The reason being put forth by the Quran is that he does not in any way act or think like Noah whereas, in fact, the Messenger of Allah (s) considers Salman Farsi to be from the Ahlul-Bayt. 
The Infallible Imams (a.s.) did not consider the good people from the Banu Umayyah to be from them. For example, Sa'd al-Khair is from the Banu Umayyah clan. One day, he visited Imam Muhammad Baqir (a.s.) while he was crying loudly. The Imam said: "What has made you cry?"
Sa'd said: "How can I stop crying when I am from that accursed tree in the Quran?"
Imam Baqir (a.s.) said:
«لَسْتَ مِنْهُمْ أَنْتَ أُمَوِی مِنَّا أَهْلَ الْبَیت»
You are not from them. You are the Amawi who is from us, the Ahlul-Bayt. Have you heard the saying of God Who said: "So whoever follows Me will be from Me." Conclusively, we must say that the name "Banu Umayyah" refers to all those people who intellectually and practically collaborated with Banu Umayyah. That is to say, all those who were opposed to the imamate (leadership) of the Imams (a.s.) and were directly or indirectly involved in committing crimes against them or were just happy with the atrocities unleashed upon them are included. This point is clearly inferred from the statements preceding and following the curse in Ziyarat Ashura. That is because the context of the Ziyarat indicates that those cursed are people who usurped the caliphate and reclined on its throne through illegitimate ways. They were the ones who made every effort to turn off the light of Allah leaving no stone unturned to express their enmity to the family of the Holy Prophet (s). It also includes those people who gave backing to these people or consented to their crimes. Thus, the good and noble people from Bunu Umayyah are categorically excluded. That is to say, the curse in Ziyarat Ashura does not include the good doers from Banu Umayyah in the first place.
In his explanation of Ziyarat Ashura, Late Mirza Abul Fazl Tehrani confirms these two reasons and he argues by further adding two more points:
1. The word 'Banu' has been added to 'Umayyah' signifying intended people within this clan. That is to say, 'Banu Umayyah' refers to only those people from the descendants of Umayyah who were hostile to the Ahlul-Bayt (a.s.) and hated them.
2. In a narration, the Infallible Imam, peace be upon him, uses the term 'Banu Umayyah' but then he applies it to people like Abu Sufyan, Muawiyah and Aal-e Marwan.
In conclusion, even if we suppose that Muawiyah son of Yazid is not included in the divine curse, we must say that the context existing in the body of Ziyarat Ashura shows that 'Banu Umayyah' refers to a certain group of people with Muawiyah bin Yazin not counted among them.
For further information in this regard, refer to answers 854 (site: 928) and 2796 (site: 3372).
 - Saffar, Muhammad Hasan, Basaer al-Darajat, pg. 170, Ayatollah Mar'ashi Najafi Library, Qom, 2nd edition, 1404 A.H.
 - That is why, some scholars like Mirza Abdul Afandi has said in Riyadh al-Ulama: "It is not known whether it is permissible to curse Umar bin Abdul Aziz or not. Sayyid Razi has a poem in his "Collection of Poems" in praise of Umar bin Abdul Aziz. He has spoken of him with respect and reverence.
 - Al-Najm, 38 – 41. The sentence "no bearer of burden shall bear the burden of another" in verse 164 of Sura Al-Anaam; 15, Al-Isra, 18, Fatir; 7, al-Zumar.
 - Al-Qamar, 29; Also, Ali (a.s.) said: Verily, only one individual killed the camel of Thamud but Allah held all of them in punishment because all of them joined him by their acquiescing in their consenting to it." Nahjul Balaghah, Subhi Saleh, Sermon 201, pg. 319.
 - Al-A'raf, 77; Hud, 65; Shu'ara, 157; Shams, 14.
 - "They hamstrung her (she-camel), so their Lord, on account of their crime, obliterated their traces and made them equal (in destruction, high and low)" [Ash-Shams, 14.]
 - O' people, certainly, what gathers people together (in categories) is (their) agreement (to good or bad) and (their) disagreement, for only one individual killed the camel of Thamud but Allah held all of them in punishment because all of them joined him by their acquiescing in their consenting to it. Nahjul Balaghah, Subhi Saleh, Sermon 201, pg. 319.
 - He said: "O Noah! He is not of thy family: For his conduct is unrighteous. So ask not of Me that of which thou hast no knowledge! I give thee counsel, lest thou act like the ignorant!" [Hud, 46]
 - "سلمان منا اهلَ البیت" "Salman is from us, the Ahlul Bayt." Majlisi, Muhammad Baqir, Behar al-Anwar, vol.65, pg. 55, Al-Wafa Institute, Beirut, 1404 A.H.
 - Behar al-Anwar, vol.46, pg. 337; Shaykh Mufid, Al-Ikhtisas, pg. 85, The Millennium International Congress on Shaykh Mufid, Qom, 1st edition, 1413 A.H.
 - Tehrani, Mirza Abul Fazl, Shefa al-Sudur fi Sharh Ziyarat Al-Ashur, vol.1, pg. 255 – 263, Murtazavi Publications, 1st edition, 1376 A.H.
 - For further information in this regard, vide: Tarkhan, Qasim, A Mystical, Philosophical and Theological Attitude towards the Personality and Revolution of Imam Hussein (a.s.), pg. 279 – 291.