I use GIMP (not having anything better).
I set a random colour as a background, specifically a colour that does not appear anywhere in my picture (for the Drunken Skull I chose black).
Then I select a region by colour (black in this case).
Next I use Colour-to-alpha, select black as the source, and GIMP makes the selected black region transparent.
Save as PNG.
The most difficult part is taking a photo with all its background noise, and tracing around the edge of the actual keycap with black. Takes ages. The rest is relatively easy.
I seem to remember doing it in PaintShopPro a few years ago was much simpler, but I no longer have access to that app.