If you want to stay with real fluorescent
This answer is about staying with fluorescent. I do hundreds of fluorescent upgrades. You have good prospects any way you want to go. In most cases electronic ballasts will fit right up where the old ballast was.
Yes, all new ballasts are electronic, but that is an overall "win" as they are vastly superior. They do not hum, they do not shimmer, and they do not start badly in the cold. The best ones have a momentary hesitation on startup, but so do many LEDs. You have some things to decide.
Older F40T12 tubes, vs newer F32T8 tubes
First, do you want to switch to the more modern and efficient "T8" type tubes? You probably do, but that will require keeping tubes straight inner vs outer, since T8 tubes won't work on a T12 ballast or vice versa. You could also switch both ballasts (I advise one at a time). The T8 type is F32T8, the T12 type is F40T12.
Ballast types and wiring
"Instant-start" seems like a better feature, right? However to start the tube without use of pre-heaters, it shocks the tube with a very high voltage, and that shortens tube life somewhat. Something to think about for a difficult-to-access fixture.
Wires: Your old ballasts will have black+white, + some other wires.
- If it is 1 red and 2 blue, your only choice will be an "instant-start" ballast. Modifying the fixture for the other kind will be too much work to do from a ladder.
- If it is 2 yellow, 2 red and 2 blue, then your best bet is a "rapid-start" or "programmed-start" ballast, since it will wire up exactly the same - paint by numbers, can't get it wrong lol. The "programmed-start" ballast gives a very gentle start that extends tube life further. It's my preference.
When counting wires, look at the text of website listings, not the photos. They often use the same photo for all ballasts.
Different fluorescent ballasts have different brightness on purpose; this feature is provided to help lighting architects get the light intensity correct. The brightness is decided by a figure called "Ballast Factor" (not to be confused with Power Factor, which you won't need to worry about). A Ballast Factor of 1.00 means you get exactly the watts and lumens advertised.
"Low" (L) or "Extra Low" (2L) ballasts have a 0.7 to 0.9 ballast factor, or 70-90% of normal brightness.
"High" (H) or "Extra high" (2H) ballasts have 1.1 to 1.3 BF, or 110-130% brightness.
So you look at a) "F32T8 vs F40T12", b) wiring, and c) ballast factor, and go shopping for a ballast.
It wires right up, and then you install the tube type that matches the ballast.
On the tube types, you get to choose your color temperature (2700K vs 3500K vs 4100K vs 5000K, 4100K being traditional fluorescent). That decides how yellow or blue the light will look, and will be apparent when looking at the fixture. (and how it matches other lights).
You can also choose your color rendering index (CRI) or how color-pure the light is. 80 CRI being the realistic minimum you'll find in real fluorescent, and many tubes being 90 CRI or larger - 100 is perfect.
I myself prefer T8 ballasts made by GE, Sylvania or Philips/Advance... with Sylvania 22438 T8 tubes, 4100K and 90 CRI. Menards stocks those at sane cost.
The great news is top quality ballasts are readily available cheap. One fellow on eBay has thousands of beautiful GE programmed-start ballasts on sale for $2 each, but they are "2L" (0.71 ballast factor). Great if you want that. But if you don't, watch out - many resellers buy them for $2 and resell for $7-12.
Wiring it up
Unplug the fixture. If it is hard-wired, then shut off circuit power, and install a "ballast disconnect" inline along the black and white wires. This is a Code requirement and allows you to turn the power back on while re-wiring the fixture (so any other fixtures in the room can illuminate your work - it's the first thing I do). Obviously, do the wiring with the connector parted!
After that, cut the wires where they enter the ballast (no one ever said "Oh no, I have too much slack!").
Then just match up wires, like for like color, assuming you got the correctly matching type of ballast. Wires of the same color CAN be interchanged.