To get an image with transparency from save(…) by drawing on the default canvas, you need to first change the pixel format to include transparency. It does not by default. Then when colors are specified, include the amount of transparency. For example, background(…) with two parameters specifies grayscale with the second parameter being transparency. This example produced a PNG with a transparent background for me:
void setup() {
size(1280, 720);
noStroke();
g.format = ARGB;
// set the default PGraphics instance ("g") pixel format
// to include transparency, by default it does not
}
void draw() {
background(0, 0);
// clear to transparent by including alpha 0 in background(...)
ellipse(width * 0.5, height * 0.5, 100, 100);
save("test.png");
}