I am not talking from experience, just a lot of reading. Hens lay the most eggs the first year, have a good second year and can have a decent third year and then they really drop off from there.
A hen can lay as long as she is alive. The production drops off each year. If you are talking egg production only, the first two years are best. Hens for breeding stock remain viable far longer.