There are many reasons one would decide to build a chicken coop for their property. One of the first things that need to be considered is for those in an urban area is whether there is an existing zoning law against erecting one. If a zoning law is in place and you still wish to proceed your first step would be to acquire enough signatures from your neighbors to give the local zoning board a reason to grant you a waver on the established law. Some things that might help in persuading your neighbors would be a chicken barbecue and the promise of free fertilizer.
For those that live in a subdivision that has a home owners association, there might be more restrictions. You local home owners representative would be able to advise you on whether this is possible or even feasible to build and raise chickens at your location.
The home owners that have little to worry about are the ones that live in unincorporated areas around cities. Here there are little to no zoning laws. This is the reason one would see a trailer home next to a $500,000 house. It is the land owner's decision to have what they want on their land. If you live in an unincorporated area then you need to decide where and what size of a chicken coop will fit your needs. Another decision is whether this will be a permanent structure or a portable chicken coop.
Once the decision is made to move forward, then be prepared for fresh eggs as long as you purchase hens and not roosters to fill your chicken coop.