Direct sun rays into a poultry house lead to an increase in temperature. This affects the eggs because the chicken receive uncontrolled heat. The heat can easily make the eggs go bad even before they are picked.
Secondly, since the temperature is not controlled the chicken eat less, hence reducing productivity. Some chicken will scramble for the sun rays, causing a stampede in the house.