If you get a baby ball, you can use the 20gal in the beginning, but save the 40 gal for when he grows up.
I WILL write a short list, because having a proper set up is SOOOOOOOO important BEFORE you get the snake!!!
You have to set up the tank and test the day and night temperatures to see if you need two heat sources or if you can reach the desired temperatures with just one. An undertank heater or a Ceramic Heat Emitter can run all the time. If you get a Ceramic Heat Emitter (Ceramic Heat Emitter) you'll need a secure cage around it so the BP can't get inside and can't burn himself on it. You need to get a rheostat/thermostat so that you can adjust how hot the heaters get.
You should have a set up that will drop the temperatures at night to 75-80.
You also need good thermometers (the stick on glass strips are not good enough)
You want to set it up so that the heat is on one side of the enclosure, so there is a temperature gradient. The warm side should have a basking spot of 90 degrees and the cool side about 80. So there is a range in the middle between the two.
I use florescent bulb lighting for my BP. It's on a timer 12 hours on/ 12 hours off.
Or as you suggested, you could have the under tank heater run day and night and a basking light just during the day. But you'll have to test it and see if the night temps will be too cool without the lamp or if both together on during the day will get too hot.
You need 2 hide boxes; one each side of the enclosure and a moist hide (tupaware with damp sphagnum moss) Instructions here:
Moist Hide Creation
And you need a water dish big enough for him to soak in... but not enough to drown in! It should be low and shallow or the BP will tip it over trying to drink or get in.
Read Rich's Caresheet here:
Ball Python Caresheet
As far as whether to get a baby or a juvenile it's up to you. If you get a baby, you should be sure that it has eaten at least 10 times. (an established eater). A juvenile will probably be less difficult with feeding, but as males get to be around 2 years old, they go on long winter fasts: mine has not eaten since Xmas!
Get some good books and read all the BP posts for what sort of problems/solutions have come up for other owners.
This is how my first BP enclosure looked:
(You don't really need a branch in there because BPs are pretty lousy climbers for the most part.) As a baby mine climbed a lot, but now that he's grown up, he never climbs. If you use a branch, make sure it is not too high, because they WILL fall and you don't want injuries!!
I hope that helps. I cannot recommend strongly enough that you get the enclosure set up and temperatures properly adjusted BEFORE you get the little guy! It will save you LOTS of headaches (and money)!!