Chickens get into flower and vegetable gardens for a variety of reason. For example, they eat the bugs that live there. Beatles, grubs, worms and even snails all form important parts of a chicken's diet. The presence of flowers and plants lures the bugs, and the bugs lure the chickens. Chickens also like to take "dust baths," and seek out flower gardens as places that provide open areas with plenty of good dirt.
The scratching and dirt bathing of the chickens can damage your plants and flowers, though. Chickens aren't careful of the plants when they're after bugs, and can tear those plants and flowers to pieces. Take a couple of steps to keep them out of flower gardens for good.
Fence your flower garden in, to keep chickens out. Build an attractive split rail or white picket fence around your garden, and then line it with chicken wire or mesh to keep the chickens out. If you want to leave your flower garden open, discourage chickens by sprinkling chili powder around the borders of the garden. Chickens don't like chili powder, and will stay away from the area. Plant your flower garden densely enough that there are no open areas for scratching and dirt bathing, or fill those areas with decorative rocks to discourage chickens. Put stakes around individual plants when you plant them, to discourage the chickens from picking at the plants to get bugs. If you have room, put your chicken coop 400 to 500 feet away from the flower garden. Chickens will be unlikely to travel that far from their home, and will stay away from your flower garden.