Kumara Swamy or Kartikeya is also worshipped as Subrahmanya swamy (snake form). What is the story behind taking this form? Which Purana states it?
According to Mopidevi Subramanya Swami temple of Andhra Pradesh, the story of Kumara Swamy turning into snake is mentioned in Sahyadri Khanda of Skanda MahaPurana. You can read Sthala Purana from here (in telugu).
Sahyadri Khanda mentions legends of temples on the bank of River Krishna. You can read Sahyadri Khanda in Sanskrit from here.
Temple website describes the story in English as follows :
Four Deva Rishis viz., Sankara, Sanakasa, Sanatkumara, and Sanatsujata are known for their un-wavering devotion and saintly knowledge. They are immortal and always appear at the age of five years to others. They remained so detached from the awareness of worldly matters that they remain naked without covering their bodies. Once, they came to Kailas, the abode of Lord Shiva to worship Him. At the same time, Sachi Devi, Swaha Devi, Goddess Saraswathi and Goddess Lakshmi also arrived. Lord Subrahmanyeswara was sitting in the lap of his mother Goddess Parvathi by that time. Lord Subrahmanyeswara as a child was bewildered at the two contrasts of fully clad Gods and Goddesses on one hand and the nude Deva rishis on the other. He giggled innocently in a childish way. Goddess Parvathi chided Lord Subrahmanyeswara for his folly. Later, Lord Subrahmanyeswara realised his lapse and took permission to do penance to get rid of the blemish. Lord Subrahmanyeswara did the penance in disguise, in the form of a snake for many years and successfully cleansed Himself of his folly. The place where Lord Subrahmanyeswara did penance later came to be known as ‘Mopidevi’.