The snake represents several things in "The Little Prince". From a Biblical perspective, the snake represents the evils of the world, which are unknown to the Little Prince. The Little Prince had not been on the Earth long enough to experience the evils of man; he landed in a desert where these evils would not exist. The pilot was the only human he encountered on Earth, and the pilot displayed no evil towards the Little Prince.
The snake was also very persuasive, and upon learning of The Little Prince's desire to return to his asteroid to see his rose, and alleviate his being homesick, the snake offered him a way to return home. The snake was the only means for The Little Prince to return to his asteroid, according to the snake. The snake was The Little Prince's "transportation" to his little asteroid and his beloved rose.
The snake also represents death. Because of the Little Prince's desire to return to his beloved rose, he makes the decision to allow the snake to take him there. The Little Prince did not understand the explanation of the snake's means of transportation, and as a trusting little child would do, he allowed the snake to bite him, not knowing that the snake would take his life in the process.