Ideally, I think custody should be joint if both parents want it, and they live in close proximity to each other. In any case, when total custody is given to one parent, the custodial parent should make it as easy as possible for the non-custodial parent to have access to the children. Parents shouldn't have to go to court to have access to their children unless they are a threat (deemed so by professionals, not a bitter spouse) to their welfare. I don't even understand how a parent can refuse access and get away with it.
As to whether the custodial parent should be the mother or the father, I think it depends on who can best provide for the child in all areas: emotionally, financially, spiritually, etc, and also, who wants to parent more? Maybe mom's career keeps her away from the family but dad's schedule is more conducive to family life. Or dad, much as he loves his kids, wouldn't feel comfortable in the single parent role. I think women, in general, are more nurturing, and more likely to be the suitable custodial parent, but that shouldn't be the assumption in every situation.