These numbers are the diameter of the bulb x 1/8. So a T12 is 1.5", T8 1", T5 5/8".
Comparing bulbs of the same wattage:
The narrower lamps are newer, more efficient, and brighter due to their smaller surface area. The smaller form factor allows to reflect more light into the tank that would otherwise be lost. Depending on the reflector, of course.
All things equal, you would need less watt/gallon using T5's compared to T8's compared to T12's to get the same light intensity.
Also, it is very easy to find a lot of cheap or aquarium dedicated bulbs in T12 size, it will be a little harder in T8's, and you'd be lucky if you find a T5 with decent light temperature that isn't outrageously overpriced.
Both bulbs and reflector are equally important to light the tank.
I just upgraded from 2X 40W T12's to 4X 32W T8's in addition to 1X 55W PC . I love the simplified T8 wiring of the ballast (6 wires feed 4 bulbs) but am not so happy about the color (~4500 K). Our LFS stocks T5's in a number of colors and sizes but they are sold as a disposable bulb/ballast and are spendy.
As a DIY the T8's are great at $20 a ballast and $2 a bulb at the warehouse store!