To charge a battery, one places it in the upper item slot on the interface of a powered Battery Box. The Battery Box depletes its stored energy to charge the battery. The process can be reversed by placing the battery in the lower item slot, restoring energy to the box at the expense of the battery.
To charge a Sonic Screwdriver, both the screwdriver and a charged battery should be placed in the player's hotbar, preferably in adjacent slots. This being done, holding right-click with the battery selected will drain the battery to charge the screwdriver.