When light strikes any surface, including the iris, some of it is absorbed and some is reflected back. What you see is the light that is reflected. The difference is caused by how much of a pigment called melanin is present.
Melanin is the pigment that gives color to human hair, eyes, and skin.
It is also a major pigment in animal fur or hair, eyes, and skin. In brown eyes, there is a lot of melanin throughout the layers of the iris. If the placement of the melanin scatters the reflected light, the effect is the same as it is when sunlight is scattered by particles of the atmosphere to make a blue sky. First, genes tell the cells that need melanin how to manufacture it. Some of this recipe involves instructions about the movement of melanin through tissues and the timing of when it's made, both of which are complicated processes.