Teddy is the little boy of the British family and a future recipient of some serious psychological help. Honestly, three snake attacks in only two days? His ophiophobia (or, as we like to call it, common sense) will be fierce.
If we look at "Rikki-Tikki-Tavi" through the lens of traditional storytelling motifs, Teddy represents innocence. The kid is the embodiment of good, remaining uncorrupted by the world's evil and deadly influences. We can see this innocence right away in Teddy. When he's first introduced, he believes Rikki-tikki to be dead and says they should have a funeral for the critter (3). Only a really kind boy would feel the need to have a funeral for a dead animal found on the side of the road.
The character's innocence also makes the stakes really high for the story's other characters. If Teddy and his parents die, then the cobras will become "king and queen" of the garden and bungalow (54). That means the protector or hero character—one Rikki-tikki-tavi—must save Teddy, his innocence, and not to mention his life at all costs.
Of course, this also leads to an interesting question: why make Teddy a British citizen? From a postcolonial reading of the story, the fact that Teddy's a British citizen makes all the difference. Here, Teddy is the future for British prospects in India. Nag and Nagaina's attempt to kill him is a bid to remove the colonial influence from the garden, and Rikki-tikki's fight to save him is to keep that influence for the future of the area.
It's not simply a matter of guarding purity. Instead, it becomes a matter of guarding the British rule over India, which through Teddy is seen as a kind and benevolent force—as supported by the "Traditional Teddy" outlook above. In this case India, it's as if the story is arguing that India needs British rule since British rule means someone as kind as Teddy. (See how the two readings don't necessarily contradict each other? They can actually both be right. Crazy!)
So is Teddy really a force for good? With the benefit of historical hindsight, it's not totally clear how positive or detrimental British rule was.