Yes, peacocks can eat snakes. They kill the snake slowly by the neck holding it down with their claws after which the peacock swallows the snake.
Keep in mind that peacock is an omnivore, they can eat anything. They eat plant and seeds too. Snake is not their main diet but they eat snakes if the option arises.
Peacocks may look like harmless creatures because of how they look. Peacocks hunt other animals too and they eat snakes in particular. A lot of people consider snakes as one of the scariest animals on the planet and yet, no one would consider the peacock as one of the scariest. This is once again because of the appearance of these two animals. Peacocks have long legs that are scaly. This will allow them to move fast.
They also have very strong claws. They use it to their advantage so they can catch snakes and their other prey immediately. Take note that there are some peacocks who do not actually eat snakes. There are times when they kill the snakes in a slow manner.