As per the mythologies, Kuber was a simple man, not too good-looking, but a great devotee of Lord Shiva. He worshipped Lord Shiva for many years, after which the Lord appeared in front of him in person and granted him the custody of all the wealth in the world as per his desire. Being a person of modest means, Kuber was thrilled with the boon. However, by and by the boon went to his head, and he became greedy. He wanted to make more and more money. He forgot that he was just a caretaker and not the owner of the wealth. When Shiva found out about this greed of Kuber, he sent his son Ganesha to a feast arranged by the latter for all the Gods, to teach him a lesson. Ganesha arrived before any other God and ate up everything Kuber had prepared for the feast, and, still not satiated, Ganesha ate up all Kuber's accumulated wealth, then his palace, and then when as he was preparing to eat Kuber himself, Lord Shiva appeared and made Kuber realise his folly. Kuber apologised and vowed to never again misuse his power. Thenceforth, Kuber has been known as the God of wealth, and praying to him sincerely by following all the rituals prescribed in the Vedas, you can attain all the wealth and riches you desire.