Yes, hardware cloth is definitely great for keeping predators away from our precious poultry. We use 1/2" here. I wonder, depending on the size of your snakes, if 1/4" might be needed though? You'll know I'm sure, and good luck!
We do have a Predators and Pests forum by the way. You could peruse that or ask questions about snakes there too.
Welcome to BYC. We used to have a lot of snakes here but my cats have pretty much taken care of them. Hardware cloth keeps them out of my chickens' areas but they still came around the outside of the run and would "climb" it. I haven't seen many since we adopted indoor/outdoor cats.