If somebody keeps egg-laying hens in their backyard and makes sure they are loved and well cared-for, what's wrong with taking and eating their eggs from the perspective of veganism? If a person who identified as vegan was considering getting backyard chickens, what ethical considerations would you want them to be aware of?
One of the philosophies vegans use is that it's wrong to use animals. This relates to other ethical philosophies that advocate treating people as ends in themselves and not as means to our own ends.
According to this philosophy, animals exist for their own purposes and confining them to benefit from them in any way is abusive, just as confining humans in order to benefit from them would be (if you know the movie, think of the machines harvesting human body heat in The Matrix).
Some vegans are willing to make some compromises around this area. Since healthy animals ovulate without intervention, and chickens do not make use of their unfertilised eggs, there is no obvious actual harm caused by using hen's eggs that are acquired incidentally from free hens. It may be the case that the kept hens have been rescued and would not be safe in the wild, and in such a scenario there might seem to be no ethical objection to eating the eggs.
Some vegans go on to consider the implications of selling eggs obtained that way. This is objected to as it is seen as using the animal as means to an end (obtaining money), though I am not sure how much more so selling is such "use" compared to eating yourself. A vegan who, for aesthetic reasons (disgust or distaste towards all animal-derived ingredients) does not want to eat the eggs, had better give them away freely. Then, not benefiting personally in any way from the use of the hen, they have not broken their own code... Still, giving, or selling eggs to people who would otherwise obtain them could be seen as creating or maintaining a market or demand for eggs, which can only be obtained according to these ethical standards in very small quantities. Since this "ethical" source cannot supply the entire market, it would be better for there not to be such a market.
These are some of the arguments usually made around this topic, one on which individual vegans take different positions.
@Zanna makes some good points and considers that:
"It may be the case that the kept hens have been rescued and would not be safe in the wild, and in such a scenario there might seem to be no ethical objection to eating the eggs."
However, in the vast majority of "backyard hen" situations, the hens are not "rescued," but rather are purchased. The production of egg-laying hens has serious ethical implications, similar to buying poultry meat. In particular, since roosters do not lay eggs and can create problems by fighting or make noise (and are sometimes specifically outlawed by local ordinance) the males are usually systematically killed at some (usually early) stage in the production of egg-laying hens. Graphic videos of what happens to the male chicks abound.
According to the Physicians Committee for Responsible Medicine, eating eggs can cause heart disease, diabetes and cancer. Also, "Plant-Rich Diets" has been found by the Drawdown.org researchers as a top solution for climate change.
Aside for animal welfare concerns, there are are also ethical considerations related to health and climate change related to eating animal-based foods.