Can a weapon wielded during combat be immediately identified as a masterwork weapon simply by looking at it, or does it require some sort of search, appraise, craft(weaponsmithing) or some other ways to see that it is in fact a masterwork weapon ?
By the rules…
The Rules Compendium on page 12 clarifies and expands the skill Appraise so that a creature can take 1 min. and make an Appraise skill check to determine the value of a rare object (DC 20) like a masterwork weapon. Success means that an untrained appraiser makes an estimate that’s inaccurate by (2d6+3) ×10% and that a trained appraiser makes an accurate estimate of the object’s value. Failure means that the appraiser can make no estimate. A creature can instead take a 1-round action to make this check, but the check's DC is increased by +5.
(It's a rare item due to a creature having to make a Craft skill to create the masterwork component (DC 20), therefore the component's craftsman needing to possess a skill bonus of +10 to +14. It also assumes that the craftsman took 10 to create the component instead of the craftsman being an amateur who got lucky or a master who had several bad weeks.)
So far as I'm aware, if the rules are slavishly adhered to—which this reader does not recommend but totally respects—, the Appraise skill may be the game's sole official way to identify a masterwork item… and, then, only by implication. That is, the appraiser knows (or approximates) the item's value, then—because of the stagnancy of D&D 3.5 prices—the appraiser will probably believe that any item worth vastly more than its list price is probably a masterwork item. (The appraiser could still be wrong, of course. The item could have value as an art object rather than—or in addition to—the item's functional value, but an item's value as an art object may be obvious to even a causal observer.)
…But this DM doesn't follow those rules, and everything's fine
Even this DM—who encourages at least one PC in any party to have ranks in the skill Appraise so that loot values are easily determined—would never run things so strictly. Instead, when a creature is armed with a special weapon, I consider the creature, the circumstances, and the weapon, and describe the weapon appropriately. Further, any creature that wields a masterwork weapon knows immediately that it's a masterwork weapon; the same goes for wearing masterwork armor, using a masterwork shield, or employing masterwork tools. (This also saves the DM from having to keep more secrets from the PCs!)
For example, the reckless gnoll chieftain Ssorgmi lives in squalor in the Swamp of Icky Slime but wields a masterwork longspear. Ssorgmi's masterwork longspear probably won't be identifiable as a masterwork longspear until after its been cleaned and polished by the PCs who defeated her, and even then it may take the PCs stabbing folks with it a couple of times to believe (despite the players being told so by the DM and their PCs getting from it the +1 enhancement bonus on attack rolls) that mud gnoll's masterwork longspear is really a masterwork longspear.
On the other hand, Emosewaedud the hobgoblin ronin is meticulous about maintaining his masterwork bastard sword. When he whips that out, the PC's can hear that Cuts the Breeze—the family weapon wielded by 10 generations of noble hobgoblin warriors—is masterwork weapon.
In other words, rather than making skill checks, ability checks, level checks, or whatever to determine if a weapon a creature wields is masterwork, this DM is content with just telling the players when a weapon a foe wields is obviously masterwork and doesn't tell the players if the weapon's masterwork if it's narratively appropriate that their PCs wouldn't be able to tell at a glance.
Definitely not. Even with a skill check, it's not plausible to gauge the quality of a weapon just from a glance. The characteristics that make a weapon effective as a weapon (balance, metallurgy, etc. etc.) aren't visible to the eye, or not without close inspection. (Exception: special materials may or may not be easily recognisable.)
If the weapon is distinctive, you might be able to make an educated guess: "only the Iron Dwarves make their axe-heads in that shape, and they're famous for the quality of their work". But that would definitely require a skill check (IMHO Appraise or Craft) and you might get fooled if somebody's making cheap knock-offs in the same style.
I think weapons can have various visible qualities that rule out the possibility of them being considered masterwork: notches in the blade, bends where things should be straight, and so on. As a DM, I would probably use signs of poor maintenance, like rust, as a sign of low quality weapons—after all, even though you can fail to give a quality weapon proper maintenance, that’s not expected in this game where equipment maintenance is hand-waved as assumed to be happening in the background.
But plenty of other things can be wrong with a weapon that aren’t obvious just by seeing the weapon at a distance. Issues with balance and weighting, for example. Maybe portions of it haven’t been hardened properly. Whatever. It seems easily plausible that a weapon could fail to live up to the standards of “masterwork,” without actually having any visible defects.
And then, on the flip side, there are certain things in the rules that are always applied solely to masterwork weapons. Most special materials, for example, specify that weapons made from that material are always masterwork. If the material can be recognized, then you can tell it’s masterwork. Likewise, certain distinctive styles might be renowned as always of the highest quality—for example, officially katanas are statted as “bastard swords that are always masterwork.” So if you see a katana, you knew it was masterwork. Similar things might be true in a given campaign world for elven or dwarven or whatever weaponry, perhaps.
Finally, of course, magic weapons are always masterwork. Someone with detect magic or similar could therefore recognize masterwork weapons when they are also magical.
So the long and short of it is that there are some weapons that are clearly not masterwork, and other weapons that clearly are masterwork, and then a decent chunk of weapons that cannot be directly determined by visual inspection.
The other thing worth pointing out here is that D&D 3.5e has really minimal rules for “sizing up” your opponents, at least in martial endeavors. There is no martial analogue to Spellcraft, for example. Many tables play this straight, forcing players to learn about their opponents by making rolls and seeing what is good enough and what is not, for example, to gauge their AC. If the DM rolls opponent rolls openly, attack roll and saving throw bonuses can also be found this way. The problem with this is that you only get to see so many rolls before the fight is decided: it is rare for a fight to go more than 2-3 rounds without a clear victor having emerged (even if mopping up is often necessary). Too much happens on a given turn, in a given round, for this method to really be all that effective.
It’s also not realistic. Warriors are much better at sizing opponents up—at least in the sense of, “better than me,” “worse than me,” “about equal,” “much better than me,” and so on. Obviously, the real world doesn’t boil everything down to nice, neat numbers, but “getting the measure” of your opponent is a thing—that phrase, along with “sizing someone up,” is a phrase because it describes a real process.
So a warrior might not be able to tell how high-quality a weapon is at a glance, but he will be able to tell, very quickly, to a general degree how high-quality his opponent is. That gives hints about the quality of his equipment. An opponent might have been caught off-guard, and be using whatever weapon he had at hand, or somehow have recently lost his best equipment for some reason, but most of the time, a high-quality opponent is likely to have high-quality gear. After all, a masterwork weapon is easily affordable by 2nd level, even on NPC wealth, and well worth it for anyone who plans on hitting anyone with a weapon. Really only 1st-level characters should have non-masterwork weapons—and even most of those will still have the masterwork version.
As part of the Appraise skill description in Rules of the game, it is true that rare items are made by craft with appropriate skills between +10 and +14 and it is also true that the masterwork component of a weapon is DC20 thus a skill modifier of +10 on a take 10 required for the crafter. But the Appraise skill is used to determine the value of an item not its nature. ie. a longsword that is worth 315 gp maybe a masterwork longsword or a ceremonial longsword (used as a normal longsword in combat). If we consider this, we could even adjudicate that someone with an appraise skill could not determine if it is a masterwork item but only that it is worth that much. A rusted/damaged masterwork longsword could be valued at 200 gp instead of the 315gp with an appraise check. On the other hand, someone with a craft skill in the appropriate craft has to recognize something he can do. The crafter would know it's a masterwork weapon, that it is damaged but won't be able to give a value of the item.
Also, it is not clear if appraise can be used on items at all as weapons are defined as weapons and armors as armors in rule books while items are all other objects.
When looking into the Player's Handbook, Dungeon Master's Book and Rules Compendium, there is no rule that states how to recognize a weapon, an exotic weapon or a masterwork weapon. The only rule that exists is for magic weapons that can't be determined unless with something similar to detect magic. The question is very valid but I can't see anything in the rules that would stop a character to recognize a masterwork item, the same as to recognize an exotic weapon, etc. At this point I would recommend leaving this to the DM to decide and take into consideration that a character with the weapon proficiency should know how to recognize a weapon he can wield and probably a masterwork version by handling it or by seeing someone handling it. And someone with the craft skill modifier of +10 should also be able to recognize a masterwork weapon. You can easily use the DM option of using skills with different modifiers such as a spot check with Int modifier that needs to beat the craft DC. But this is really an example. As long as it is not used to unbalance the game that you decide it is not possible to know or that the PC know automatically. (i. e. if they can't know, then the Sunder combat option for the PC is less interesting since it means they will potentially break and render worthless their loot. On the other hand, you may discover that always knowing and having your barbarians PC take Improved Sunder and Power Attack to break all weapons that are not masterwork will get too much gp value with the masterwork weapons collected to the groul, then you can easily add the "damaged weapon lesser value" that appraise will be used to figure out... or not let them know).
Good question, not sure the answer is what you were looking for but ultimately, it's yours and your players' game.
That's the kind of thing that would be up to the GM. Is this masterwork weapon adorned with jewels that make it appear obviously well made? Does the blade have etchings carved into it? I'd say RAW probably not because it would be difficult to tell the difference between something that was made to look fancy and something that was made Masterfully.