I was granted citizenship through the naturalization process. My wife is the mother of my daughter. My daughter was under 18 years of age at the time that I became a citizen.
Under US immigration law, any person who at any point after February 27, 2001 meets all of the following conditions automatically receives citizenship the moment they meet the conditions:
- Under 18
- Lawful permanent resident (i.e. has a green card)
- At least one biological parent is a US citizen (adoptive parents also count of some other requirements are met; stepparents don't count unless they have adopted the child)
- Lives in the US in both the physical and legal custody of said US citizen parent
As far as USCIS is concerned, if a biological child lives with both biological parents, then the US citizen parent has legal custody. If the child was born out of wedlock, they must have been legitimated before they turned 16 to count as their father's child; the applicable law for that depends on where exactly you live.