There are sort of two separate issues here. One is conforming to laws/bylaws; the other is the odds of real-world effects.
As far as conforming to laws/bylaws, well, you look it up and there ya go
As far as the realities of the situation: it doesn't really depend on how deep your well is so much as it depends on how correct and intact the well casing and top are. In theory a newish well should be in good shape. In reality, not always. Moreso for older wells. And of course if you KNOW that you have an older well with a *poor* casing, or none in the case of shallow dug wells, then that would definitely be even more of an issue.
On the one hand, if you only have a very few chickens and they are kept in sanitary conditions and you don't have any awful flooding/runoff/mud issues, the risk of problems near an intact well casing is probably vanishingly low. OTOH, if there IS a problem, it doesn't necessarily ONLY affect your own well, it can affect neighboring wells that tap into the same aquifer.
As far as putting chicken manure or coop cleanings on the garden -- sure! For most plants, you want to compost it for at least several months just so it won't "burn" the plants, although if you are a very experienced gardener you may be able to make some reasonable bets on some particular restricted uses of fresh manure. There is a potential issue of contamination of veggies (that you eat) with splash from manure or compost containing food-poisoning type bacteria from the chicken poo (salmonella, campylobacter, pathogenic E coli strains, etc) so it is generally recommended (indeed required, for Certified Organic operations) that you hot-compost all manure for at least 2-3 months before applying to any food-crop gardens. But if this is just for your own use, it's up to your own tastes and preferences, and certainly there are a lot of people who take a middle ground about trying to keep fresh-ish poo away from some crops (e.g. lettuce) but use it on others (e.g. corn)
Good luck, have fun,
Pat