It's just genetics. Everyone carries dominant/recesssive genes. Dominant is brown, of course, but if both parents have brown eyes and both have
recessive genes for blue, then the offspring may have 1/16 chances of being born with blue eyes.
Same if both parents have blue eyes. If they both have recessive genes for brown, child can have brown eyes. If there is no recessive gene from
either parent for brown eyes, then all children will have blue eyes.
In the example above, if both parents have brown eyes, and both have recessive genes for blue, then one out of sixteen children will have blue
eyes..
However, this sixteenth child could be the firstborn.
It's Punnett's Square, in genetic's, where this is all charted out. (for blood type, eye color, lots of things.)
You can just google Punnett's Square. I would put a link here, but I don't know how. Sorry. Somebody will come along who has a better
understanding of genetics than I, but maybe this will shed a little light. This is actually a very elementary explanation (that I offer).