Sometimes the Rules Are Guidelines...
According to the Player's Handbook, "[Y]ou can use [Knowledge skills] to identify monsters and their special powers or vulnerabilities. In general, the DC of such a check equals 10 + the monster's HD. A successful check allows you to remember a bit of useful information about that monster" (78). And there just ain't further guidelines; I mean, there's that ominously pregnant in general squeezed in there to allow DM fudging, of course, but otherwise the DM's on his own.
...And Then There's Lore
That changes in, I think (and comments can totally correct me if I'm wrong), July 2006, when Monster Manual IV included a lore entry for each creature. In the Manual's introduction under the Lore heading, it says of the Player's Handbook's use of Knowledge skills to identify creatures
[t]hat [the creature identification rule] addresses specific creatures very well, but there’s more to be said about creatures of general types.... As a general rule of thumb, a DC 15 check or higher will reveal all of the base creature’s type and subtype traits as defined in the glossary. This often includes information about energy resistance or various immunities. For instance, a DC 15 Knowledge (arcana) check reveals that dragons have high hit points (12-sided HD), all good saves, and have darkvision out to 60 feet and low-light vision. They are immune to magic sleep effects and paralysis effects. They eat, sleep, and breathe.
Information specific to the creature, such as its type of damage resistance, spell-like abilities, or immunities come with the high DC check result. (6)
Then, without further preamble or explanation, each of these lore entries instead of being based on the creature's HD is based on the creature's Challenge Rating (a system later adopted by Pathfinder), with the DC starting at 10+CR, a change which makes sense to a degree yet leaves unaddressed corner cases like advanced and templated creatures.
I did some research and there was no Design & Development column (yes, they're really called that--O, you wacky Wizards!) about the Monster Manual IV, and Dave Noonan doesn't mention the lore entries in his articles here and here about the design and development of the Monster Manual V, so I don't know the rationale behind the change from identification based on HD to identification based on CR. (By the way, these are the last 2 Design & Development articles published, which is a shame.) (As a further aside, I was disappointed at the removal of both the Environment and Treasure lines in the later creature entries, but that's another issue.)
The gnoll entry in Monster Manual IV (67-71) presents gnolls of CRs of 3, 4, and 6 yet provides lore results based mathematically on the CR 1 gnoll. The design intent seems to be that when an advanced or classed creature is encountered the CR of the base creature is used to gather its lore. Templates, appear--based on the templates Lolth Touched (MM4 94), God-blooded (MM5 66), and Phantom (MM5 130)--to require a Knowledge skill check with either a DC of 15 + the creature's new CR or a DC of 15 straight up to identify the template. That's just for the template, though; identifying the underlying creature is a separate Knowledge skill check.
An effort was made on the Wizards of the Coast message boards to compose lore entries for creatures that lacked them. The results are here, although a more table-friendly format's here.
"But What About Dragons?"
Drow of the Underdark gives us the deep dragon (114-7), the first dragon I could find post-Monster Manual IV that has age categories and a lore entry. The Knowledge check DC for the deep dragon is 15 + the dragon's CR, implying that dragons of different CRs are different creatures therefore requiring separate Knowledge checks.