Did a bit of research on this. One bit of info from the Fresno zoo mentions that when snakes den together and "ball up" in a mass of snake bodies it effectively reduces the surface-to-mass ratio which allows for less loss of heat and moisture for the snakes. Also I know certain snakes like garter snakes mate in a mating ball (many males and a female) right as spring starts so perhaps by denning up together it gives them a fast way to get on with this first spring mating activity.