Nadine gave you a good link - those ladies in Maine are a great example of how to take on city hall and win, but I just want to clear up a common misconception about case law and this type of thing.
Case law and legal precedent will not help you here, because this issue is not under the jurisdiction of the trial courts. This is zoning, animal control and local government and so youre squarely in the administrative law process.
You need to read and thoroughly understand your local zoning codes and bylaws as they apply to chickens and you also need to read and understand any state laws referenced in your local zoning law, because you need to prove why you deserve an exception, and/or you need to prove that the town did not follow correct administrative procedure when they denied or fined you.
One last thing about administrative law: you must be patient- very patient. This will be a very tedious process that will feel very very bureaucratic, but you must follow the process and rules
to the letter. Do not miss a deadline or fail to give all of the information asked for because it will only delay the processes even further and hurt your argument
You might not need an attorney - we didnt use one when we sought a zoning variance, and we still won (not for chickens, but a variance is a variance.) All you need to be is tenacious, patient and very very polite. Do not ever give a hard time to a municipal employee - you can't shoot the messenger because you will need their expertise and help to find the right information.
Be persistent. polite and follow your instincts - if it feels like you dont have all the facts, you probably don't, and test ALL of your assumptions - don't take anything at face value unless you are 150% certain you are right an you can prove it.
Good luck!
Phyllis