Humans have 28 pairs of chromosomes and chromosomes come in pairs of two. Each pair of chromosome carries a wide set of genes responsible for everything from your hair color to the size of your nose or the bone density of your skeleton. Men have XY chromosomes, women have XX chromosomes. In boys X chromosomes are inherited from the mother and Y chromosomes are inherited from the father. Girls inherit the father's X chromosome.
This system ensures that 50% of our genetic material comes from each parent.
Now among a wide range of things the X chromosome is responsible for carrying the genes that make our eyes capable of seeing color. Long story short, when we make kids, sometimes genetic mutations occur or a chromosome isn't activated properly. When a fault or genetic mutation happens to the gene which is responsible for equipping our eyes with cones then one of two things happen:
This is why it is extremely rare for women to be color blind, because both the chromosomes from the mother and the father have to fail in order for that to happen. And the whole reason why we have two genders to begin with is because it drastically increases the chances of success.