There are some Hadiths that state that an illegitimate child cannot inherit the wealth of his biological father (See Sunan Ibn Majah 2745 and Jami` at-Tirmidhi, Vol. 4, Book 3, Hadith 2113). However, I have read somewhere that an illegitimate child can inherit the wealth of his biological mother. I would like to know what is the basis of this claim? Is there any evidence from the hadith scriptures that suggests that an illegitimate child can inherit wealth of his biological mother? What if such a child is poor and there is no one there to look after him after his or her parents have given birth to hom/her and left such a child without any support?
As for the majority opinion, this is because the lineage of an illegitimate child is proven to its mother but not its father. And inheritance is due to lineage. One can not inherit from someone to whom they have no valid lineage, and by default they do inherit from someone to whom they have a valid lineage.
The evidence for establishing the lineage to the mother and not the father is the hadith:
الولد للفراش وللعاهر الحجر
the child is for the owner of the bed, and the adulterer receives the stone
Which means that the the child belongs to and is attributed to the mother, while the father receives nothing despite his claim.
The case of an illegitimate child is also related to that of a child of Li'aan, the child is attributed to and a heir of the mother:
جعل رسول الله صلى الله عليه وسلم ميراث ابن الملاعنة لامه
The Messenger of Allah assigned the inheritance of a child in the case of Li'an to his mother
ثم جرت السنة في ميراثها أنها ترثه ويرث منها ما فرض الله له
The tradition concerning their inheritance was that she would be his heir and he would inherit of her property the share Allah had prescribed for him.