Who will get custody of a child in a divorce if the mother is a US citizen and the father has a 'green card'?

Custody is awarded based on what is in the best interest of the child, therefore the judge will award primary custody to whichever parent is best suited to care for the minor child. The issue of the father being a legal immigrant does not invalidate his parental rights to a child whether they are custodial or visitation nor his obligation to pay support if he is not granted primary custody.