It's linked to the TARDIS itself (as seen in "The Eleventh Hour", when the sonic is also remade in the TARDIS) and feeds off the rift energy, same as the TARDIS.
There's one more answer. Anything but wood. Though, in "The Day of the Doctor", when the War Doctor, Tenth and Eleventh were imprisoned in the Tower of London with only a wooden door as an exit, the War Doctor scanned the door with his screwdriver and started a calculation that ran for hundreds of years. With that calculation completed, the Eleventh could supposedly have used the screwdriver on the door to get it open. Before he had the chance to do this, however, Clara arrived to reveal that the door wasn't locked. None of the incarnations of the Doctor had thought to try opening the door manually.