For tax purposes, the custodial parent has the superior claim. If the children spend equal time at each parents home, then there are tie breaker rules.
Usually, the parents decide on who is to claim the kids in the divorce agreements. If it is not specifically addressed in the divorce decree, then the custodial parent can decide to claim the children, or release their claim to the non-custodial parent using form 8332.
Thank you for your question. Please Reply if you need additional help.