Mongoose in Hindu religion is mainly associated with Kubera – the treasurer of wealth in Hinduism. It is shown as sitting on his lap. There is also a belief that Mongoose spits gem stones and jewels. The animal is associated with Kubera because of its ability to fight and kill snakes.
In many stories, Snakes are guardians of treasure, precious stones and jewels. To frighten the snake and take the wealth Mongoose is used.
Again in many stories some type of snakes are known to have diamond fixed on their hood (Nag Mani) - perhaps to get the diamond one needs the help of a mongoose.
There is also an interesting episode involving Yudhishtira and a Mongoose mentioned in the Mahabharata:
After the Rajasooya Yajna, in which all great Saints of Bharat participated, King Yudhishtira was surprised to see a mongoose whose half body was normal and half was golden. That mongoose was rolling over and over on the earth where great Saint sat and kept their feet. As thousands of great Saints had attended that Rajasooya yagna, mongoose was extremely tired but did not stop rolling body at the earth where those Saints kept their feet.
King Yudhishtira followed that mongoose in the Yajna-Bhoomi and requested him to stop and tell what was that matter and reason for rolling body on earth of entire Yajna-Bhoomi.
The mongoose said, “O Great King Yudhishtira, there was a poor Brahmin family who had not eaten for four days. When they collected a little wheat flour and made bread, a guest came and they offered their bread to guest. I happened to pass over that few grains of wheat flour dropped on earth while making bread and my body became golden.
Unfortunately the flour on the earth was not enough to make my whole body golden. So I am looking for great Saints whose Charan-dool (dust of feet) could make me fully golden. But I am very sorry to say that even in your Rajasooya yajna where all great Saints of Bharat participated, none could match the greatness of sacrifice of that poor Brahmin.