This encyclopedia of Hindu mythology says the following about how Kubera became a god:
There are two versions of how Kubera was elevated to the stature of a god. The first version postulates that Kubera performed stringent austerities for thousands of years and, as a reward, was promoted. Another rather more romantic version is that one day Kubera had gone to rob a temple of Shiva, who is the king of robbers. During the robbery Kubera's taper had somehow been blown out. No matter how hard the dwarf tried he could not relight the taper. Nevertheless, he persisted with his efforts no matter how nefarious they were and, on the tenth attempt, he succeeded. Shiva is a benign god who is often pleased by the most illogical of efforts. This perseverance of Kubera's in his attempt to rob the god's temple won him much admiration from Shiva who subsequently granted the dwarf access to the Hindu pantheon of gods.
I know the 'first version' is narrated in Uttara Kanda of Ramayana where Kubera (a.k.a Vaishravana) practiced severe austerities and impresses Lord Brahma.
But what's the source of the alternate story where Kubera robs a temple of Shiva? Is it mentioned in Padma Purana?