U.S. immigration law permits people who are citizens or legal permanent residents to petition for their children to come to the United States. However, not all family situations are the same. In your case, you may have had a child with an unmarried romantic partner instead of a spouse.
Fortunately, U.S. immigration authorities allow parents of children out of wedlock to help their offspring achieve residency in the United States. The U.S. Citizenship and Immigration Services website explains that certain options may be available to you depending on your situation.
Legitimation is when a government recognizes you as the legal parent of your child. The USCIS explains that the mother of a child does not require legitimation to make a petition for a child.
However, if you happen to be the father, you should achieve legal parental rights according to the laws of your home country or the laws of where your child lives. Providing a copy of the birth certificate of your child may help establish your relationship.
If there is no legitimation
U.S. immigration law could still recognize your relationship with your child even without legitimation. You would have to provide U.S. immigration authorities with evidence that you have an actual parent-child relationship. You may prove that you have an emotional connection to your son or daughter and had provided your child with financial support.
Timing is also important. Your parental relationship should have begun before your child turns 21 years old or prior to your child marrying. A U.S. citizen may still petition for married children over 21, but a Green Card holder might have to seek other options to help married offspring achieve U.S. residency.