There are a number of systems for designating tube types; Wikipedia explains a number of them. As I am in the USA I am familiar with American tubes and their designations, and I'm going to discuss them here. I'll mention other designations as they are found on common tubes in the U.S.
This is not meant to be all-encompassing or encyclopedic. For more tube types, I suggest starting with the Wikipedia link above or with various manufacturer's reference manuals.
Prior to the early 1930s when the RMA system took over, tubes were given designation by their manufacturers. Prior to World War I, tubes were sold mostly for experimental purposes and in low volumes; they tended to have names (such as DeForest's Audion). After the war, as production ramped up and radio became a consumer product, they tended to get part number designations.
Among the major manufacturers (i.e. the ones with controlling patents), the designations became familiar. General Electric (and eventually Westinghouse) agreed to sell through Radio Corporation of America (RCA), and RCA tubes began with the letter U. Cunningham was the west-coast distributor of General Electric (and later RCA) tubes, so they used a C designation. Early Westinghouse (before they also joined to sell through RCA) began with W. Deforest used D. Gold Seal used GS, and so on.
RCA and Cunningham added a second letter designator for basing. RCA used V for the "old" base and X for the new base. Westinghouse used D for the old socket and X for the new socket. So an old socket RCA began UV, an old socket Cunningham was a CV, an old socket Westinghouse was a WD, and so forth.
RCA and Cunningham then followed with a three-digit designator that was the actual tube type. The first digit was seller's number: most RCA tubes began with 2, and if they did, then Cunninghams began with 3; a few RCA tubes began with 1, and in those cases the equivalent Cunningham began with a 1. Thus an RCA UX-201A is the same as a Cunningham CX-301A. Other companies that used the three-digit code usually copied RCA's numbers.
Westinghouse used a two number system, i.e. they made WD-11s and WD-12s and WX-12s, before they ended up selling through RCA and their types disappeared.
For RCA (and Cunningham) tubes, the real information was in the last two digits. An 01A was a specific type of tube, with a specific internal design, filament voltage and current rating, maximum plate voltage, grid bias, interelement capacitance, and the like. So was a 00, an 18, a 33, a 77, and so forth. Magazines and books of the era published charts of available tubes and their characteristics.
Other companies continued with their own systems. For instance CeCo, in 1926, used single letter designations (e.g. A, B and C); Donle offered their B-6, and so forth.
The RCA tube system was the most widespread and used. RCA owned most of the controlling patents for both tube design and radio-circuit designs. When radio manufacturers purchased a license from RCA to build radios, RCA required them (through Clause 9 in the contract) to use RCA tubes. Just about all of the radio diagrams printed in the magazines of the day used RCA or Cunningham (which was virtually the same) nomenclature.
As I noted above, the real information was in the last two digits of RCA's system, and by the late 1920s, RCA began phasing out the prefixes and simply used the two-digit nomenclature to describe their tubes. Thus a UX-201A simply became an 01A, a 218 because an 18, and so forth. By the early 1930s, after RCA "settled" its Clause 9 lawsuits with competing manufacturers, the two-digit code became universal.
Radio Magazine, February 1926, p. 21.
Radio Review and Radio Listener's Guide and Call Book, September 1926, p. 116
RMA stands for the Radio Manufacturer's Association. They later changed their name to the Radio and Electronic Television Manufacturer's Association (RETMA). The "electronic television" part came from the late 20s and 30s when there was a race to develop television, and there were two ways to go. One way was "mechanical" television, which used spinning wheels with holes cut in the disc to sample the image, and the image was reproduced at the other end by using a synchronized spinning disc. Electronic television used special photosensitive tubes and electronic sampling, and display was done by a cathode-ray tube and synchronized pulses of light—no moving parts. Electronic TV eventually won out, but for a long time it was not obvious which side would win. RCA was on the side of electronic television, and likely pushed for the name change.
RMA numbers first appear around 1933. The earlest I can find in the RCA manuals is the 1934 edition (RC-12).
For our purposes, RMA and RETMA are interchangable; RMA is the name mostly commonly used in the literature of the day, so that's the term I'm going to use here.
Before I go any further, please note this even though I'm going to repeat it often: nearly every rule has an exception.
The first digits are the filament (heater) voltage, expressed as a whole number. For instance, tubes beginning with 6 are 6-volt tubes, but the filament voltage is almost always 6.3 volts. Tubes beginning with 12 are usually 12.6-volt tubes. Tubes beginning with 1 vary—the 1V2 os rated at 0.625V volts, while the 1X2 is rated at 1.25 volts. Similar variations occur in other numbers. Even if the numbers aren't precise, they give you a ballpark idea of what the filament voltage is going to be.
Now for some exceptions: Loktal tubes (see my page on tube basing if you don't know what Loktals are) have a starting number of 7 for 6.3V tubes, and 14 for 12.6V tubes. Non-Loktals, such as the 14BL11, run at 14.2V.
The first letters are a designation of the tube type. They were, with many exceptions, issued in order, single letters first, double-letters later: so a 6A7 is an early tube (from the mid 1930s), whereas as a 6HZ6 first appears in 1963.
The letters themselves generally don't mean much, and there are too many exceptions to make them useful. In general, the high letters of the alphabet tend to be amplifiers and the low letters (W through Z) tend to be rectifiers, but there are plenty of exceptions (e.g the 6Y6 is an amplifier, whereas a 5Y3 is a rectifier).
The RMA sometimes released a group of tubes together, and they were meant to go together in a radio set. The 6C5 oscillator, 6L7 detector/dector, 6K7 RF/IF amplifier, 6F6 power amplifier and 6J7 (AVC) were all used together.
Sometimes the two-letter combination was non-sequential. The 6L7, 6K7, and 6J7 I mentioned directly above all had grip caps on top (colloquially called tin hats). The grid electrode was connected through this top connector rather than at the bottom with the rest of the pins to reduce interference in the input signal. Around 1940 (the first occurance I see is in the 1942 RCA manual), several tubes were revised as "single-ended" tubes, which means the grid cap disappeared and the grid was connected to a pin on the bottom of the tube. These single-ended equivalents got an S prefixed to them, so the 6SA7, 6SC7, 6SF7, 6SG7, 6SJ7, 6SK7 and 6SQ7, are the single-ended equivalents to the 6A7, 6C7, etc. They can be swapped out in a radio if you're willing to do the rewiring to make them work.
The second number (usually just one digit, but occasionally two) is the most confusing of the whole system. Supposedly it is the number of active elements in the tube. In reality, it doesn't really seem to hold up. A 5Y4 full-wave rectifier has two plates and a filament; a 5Z3 the same; but a 5Z4 has two plates, a filament, and a cathode.
The letter/2nd number combination together, however, almost always denotes a specific tube family where the characteristics identical among them except for the filament voltage. A common example is the L6 family: the 6L6, 25L6, 35L6 and 50L6 are all beam power amplifiers with similar characteristics. The 12AU6 and the 6AU6 are electrically equivalent and can be substituted for each other if the filament voltage/current is adjusted.
An exception to the rule: the infamous 1L6 is not part of the L6 family; the 1L6 is an RF pentagrid converter, not a power amplifier. It was, however, part of a group, along with the 1U4, 1U5 and 1S5, used in a battery powered portables, most notably the beloved Zenith Super Trans-Oceanics.
The second letter is the final part of the scheme. This one is generally the least confusing but still requires a fair amount of explanation.
A, B and C are revision letters. There may be Ds, Es and Fs but I am unware of any. A revision letter means that the tube underwent some sort of internal structural change, but that the electrical characteristics are still identical to the orignal, and may be used interchangably.
I'm going to note here that audiophiles disagree with this. They claim that there are differences in, say, the 12AX7A, 12AX7B, and 12AX7C tubes that make a noticable difference in use. They also claim that there are differences among the same designated tubes made by different manufacturers, and differences between the same tubes made by a single manufacturer on different manufacturing runs. I'm not going to debate the merit of the arguments here because it's beyond the scope of this discussion. I will say, however, that I am not an audiophile, and I accept the revision letters are being equivalent.
The rev letter rule does not apply to pre-RMA tubes. The old 01A tubes are not interchangable with 01s, and 00As are not interchangable with 00s, etc.
G, GT and GT/G are probably most confusing. For more details see my page on Shells and Basing, but the quick and dirty explanation is this: in the mid 1930s, as octal tubes were introduced, so were metal-shell tubes (RCA called the shell the "envelope"). RCA, General Electric, Cunningham, and many others made certain tubes (typically RF amplifiers) with metal shells. Some manufacturers such as Sylvania made the same tubes with glass shells instead. The electrical differences between glass and metal shelled tubes were primarily in capacitance (metal was a little smaller), so they were considered largely interchangable; an external shield could be added to a glass tube if necessary.
Tubes from this era had no letter designation to differentiate metal from glass where only one type (metal or glass) was being made. In cases where a single type of tube came in both metal and glass, the metal type got no letter, but the glass type got a G or a GT.
G tubes were typically large and inverted pear-shaped: the glass tube was broader near the top than the base. GT tubes were tubular—they the width of the glass shell was the same as the base all the way up. Gs and GTs were interchangable electrically, but Gs might not fit in the space where a GT was used.
At some point in the 1950s, the Gs tended to be phased out and only GTs were made. In order to make it clear that a GT could be used in both applications, the GT/G designation appeared. GT/Gs can be used anywhere GTs or Gs were found.
The last type we're going to discuss here is W, which stands for "weaponized." This came out of the early cold-war effort at making tubes that were of higher quality and tighter tolerances than consumer-quality tubes. W types could theoretically be used for anything, but they're most often seen on computer tubes of the era.
Ws did not last very long as even the military found out that the Ws really did not perform any better than normal lot tubes, and did not warrant a premium price or designation. W-designated tubes are electrically equivalent to their non-W versions, and may be freely interchanged.
Industrial and Special Purpose Tubes
I'm not sure whether this comes from RCA, the RMA or elsewhere, but there are a number of "special purpose" or industrial tubes that do not follow the RMA nomenclature. There are a few with three-digit numbers, but most are four digits long: example: a 5965.
You don't see many industrial tubes in old radios, except in cases where an industrial tube can be substituted for a regular tube. An example would be a 6057, which is a "special" 12AX7 (the characteristics are the same but the input and output capacitance are much lower). You do see industrial tubes in test equipment and other applications where tubes are used.
ECC is a european nomenclature, and I believe they came from manufacturers Philips and Mullard. As far as US tubes go, many US tubes have an equivalent ECC number, and vice-versa. An example is the 12AX7, which is the equivalent of an ECC83, so you can use them interchangably.
ECC numbers are sequential, not coded, so you can't read tube characteristics from them the way you can with an RMA tube. Example:
|ECC #||RMA Equiv.|
ECC equivalent numbers begin to appear in the 1965 RCA Receiving Tube Manual (RC-24).
There a few other numbers that commonly appear on American tubes.
JAN stands for Joint Army Navy, and is typically found on tubes from the WW2 and early cold-war era. I do not know exactly when the JAN marking appeared or disappeared.
Many tubes have a code that tells the actual factory, date of manufacture, possibly a lot number and more. Due to the large number of tube types made, a given factory only made a number types. Codes vary from manufacturer to manufacturer. Unfortunately I do not have tables to interpret them.