The number sequence next to the "T" indicates the diameter of the fluorescent tube in terms of 1/8 of an inch. Therefore a T12 is a 1.5 inch diameter tube, T8 a 1 inch diameter tube and T5 a 5/8 inch diameter tube. Each tube type has it's own ballast design so generally none of these tube are interchangeable. The ballast/tube designs each have their own efficiency and light output, the smaller T5 is generally being accepted as having greater output.
The advantages therefore depend on your objectives. If your objective is maximum light per unit volume then T5 is more desirable. If you wish lower light output, say for a low tech tank, then the other two tubes are better. Depending on vendor and brand the T5 system tends to be more expensive as well.
I was wondering about this too, because my light fixture takes 2 - T8's, but I can get high output T12's but not T8's so I was thinking about switching them out. My ballast will work fine, I put in a new electronic ballast which can drive any of them and it's currently overdriving my T8's. Do T5's, T8's, and T12's have the same socket types?
I think you should check with the manufacturer. I've seen a number of fixtures which will run t8,t10, and t12. If you have a fixture without a quick start ballast some of the newer bulbs will not turn on for up to 5 minutes The time decreases with each sucessive start. T5's are a different animal and need a fixture designed specifically for them. So if you turn on a bulb and it doesn't light up right away give it a few minutes before concluding the bulb is not compatible.
The T12 bulbs do fit into a T8 fixture. However, the round things that fit on the bulbs to seal them from water on my fixture don't fit on the new bulb so I'll have to make something up for it. I think I'm going to order in some high output T12's to try out on my fixture.