Snakes are extremely beneficial to have around, as they are very effective in keeping down vermin populations. However, there are many species that will quite happily eat eggs, hatchling chicks, or even full-grown chickens if the snake is large enough.
I'm not an advocate of killing snakes, even poisonous ones. There are some nonlethal steps you can take to reduce the likelihood of snakes bothering your chickens, though:
Don't leave the eggs in the chicken coop. The quicker you are to remove eggs after hens lay them, the less tempting a feeding spot the coop will be to snakes. Try to keep on this daily. Some chickens can become quite clever about hiding their eggs, so be sure to search thoroughly.
Eliminate cover snakes may hide in to approach the coop. Keep your grass and vegetation outside the coop well-trimmed. Most snakes don't like to be too exposed in the open, and try to stick to areas where they can be well-concealed, such as tall grass, thick shrubbery, or even areas where lots of dead leaves on the ground can hide them. The less cover they'll have when approaching your coop, the less appealing it will be as a food supply.
Eliminate hiding places in the coop itself, and any adjoining buildings. This can be much more difficult than it may sound. Snakes are experts at squeezing into tiny cracks most people never notice. On older buildings, particularly ones made primarily of wood, there can be a multitude of hiding spots snakes can squeeze into. Keeping barns, sheds, outhouses, coops, and other structures in good repair goes a long way towards making them less attractive to snakes. Use materials such as caulk to block up any external openings, and clean up debris or clutter both inside and out that snakes might use to hide in.
Keep your property clean of food. Exposed food may attract mice or rats. Mice or rats attract snakes. If you have seen rodents around your house, or signs of rodents, getting rid of them should be your first priority.
There are snake repellent products available, although I have never used them, and I honestly don't know how effective, if at all, they may be.
You can also set safe, humane traps for snakes, and then relocate the snakes after you catch them.