In the Mos Eisley Cantina, Obi Wan uses his light saber to protect Luke from a patron attacking him. Jedi (and I would assume, lightsabers) are very uncommon, so I would imagine Kenobi's attack would attract some attention. Why did Obi Wan use his lightsaber if he is trying to stay hidden?
At that point in the story, Kenobi was no longer that concerned with staying hidden.
Prior to the cantina fight in Episode IV, Kenobi was maintaing a low profile. During his time on Tattoine, Ben Kenobi had several run-ins with the local riff-raff. In all such instances, Kenobi avoided using his lightsaber as much as possible for the very reason you bring up. Instead, he would use a combination of Force abilities - mainly telekinesis and mind tricks - to drive away the attackers. This is, in fact, how Kenobi got his reputation of being a "crazy old wizard".
LUKE: You know, I think that R2 unit we bought might have been stolen.
OWEN: What makes you think that?
LUKE: Well, I stumbled across a recording while I was cleaning him. He says he belongs to someone called Obi-Wan Kenobi.
Uncle Owen is greatly alarmed at the mention of his name, glances at Beru.
LUKE: I thought he might be related to Old Ben. Do you know what he's talking about?
Uncle Owen grows angry.
OWEN: That wizard's just a crazy old man. Tomorrow I want you to take that R2 unit into Anchorhead and have its memory flushed. That'll be the end of it. It belongs to us now.
During the scene you mention, Kenobi knew that he and Luke would be leaving the planet soon, so secrecy was not a top priority. He also knew that brandishing the weapon would put a quick end to any other trouble. However, he did indeed realize that the lightsaber might draw the wrong kind of attention, which is largely why he was in a hurry to leave following the confrontation.
UPDATE: @Schwern brought up a good point... why would Kenobi knowingly come out of hiding if he's wanted by the Empire? Here's what I think (obviously this is speculation):
Obi-Wan Kenobi was only maintaining a low profile so that he could watch over Luke on Tattooine. If not for that, it's highly possible that both he and Yoda would be helping, if not leading, the Rebellion. As it is, we don't know that The Emperor & Vader are even looking for the pair. In fact, they probably assume that both Jedi Masters are dead by now. Given this fact, now that he is leaving the planet with Luke and heading off to assist and/or join the Rebel forces - who are very much on the Empire's radar - he probably sees little reason in maintaining such a low profile. He may not be broadcasting his location to the galaxy, but he also isn't going through as much trouble to stay hidden. And let's face it - when you're the man who maimed Darth Vader and you're about to get involved with the Rebellion, you're probably not that concerned about a bar fight on a sparsely-populated Outer Rim planet.
In short, he goes for his lightsaber because his and Luke's lives are in imminent danger. Both smugglers have proven resistant to Jedi mind tricks, Luke is lying on the floor with a possible head wound and the smuggler is waving a blaster around in a crowded bar room. Disarming the smuggler (literally and figuratively) is the quickest and safest way to prevent any further injuries.
The creature’s chrome pistol fired once, blowing a hole in the door. Then the torso peeled away as neatly as had the body of the rodent, its two cauterized sections falling in opposite directions to lie motionless on the cool stone. Only then did the suggestion of a sigh escape from Kenobi; only then did his body appear to relax. Bringing the lightsaber down, he flipped it carefully upward in a reflex saluting motion which ended with the deactivated weapon resting innocuously on his hip.
That final movement broke the total quiet which had enshrouded the room. Conversation resumed, as did the movement of bodies in chairs, the scraping of mugs and pitchers and other drinking devices on tabletops. The bartender and several assistants appeared to drag the unsightly corpses out of the room, while the mutilated human vanished wordlessly into the crowd, cradling the stump of his gun arm and counting himself fortunate. A New Hope : Novelisation
Additionally, we know from the new Junior novelisation ("Star Wars: A New Hope: The Princess, the Scoundrel, and the Farm Boy") that lightsabers aren't unheard-of in the Empire, just very rare and considered to be drastically antiquated. Possessing one doesn't seem to mark you out as a Jedi, just someone with a bit of a Jedi fetish:
“Yeah, hard to miss the sword, pal. Of course I know what a lightsaber is. I wonder what antique trash heap he found it in.”
The lightsaber was the chosen weapon of the Jedi Order, who served as peacekeepers in the Old Republic—pre-Emperor Palpatine’s takeover. There was some religious mumbo jumbo about meditation and something called the Force. A great big wad of nonsense, if you asked Han. Their kind had been extinct so long they were practically ancient history.
Unlike the previous answer that states this is a plot-flaw, I think this was written on purpose to introduce the lightsabers as soon as possible in the series. After all, lightsabers are one of the coolest things about star wars.
Actually, it's not only about introducing us the lightsabers, but to introduce them to Luke, since he is going to become a Jedi.
And as most previous answers have stated, Obi Wan doesn't need to maintain a low profile any more, there is a new hope and the return of the Jedi is not far away.
I know I'm going to get down-voted for this, but I honestly thought this was a plot-flaw / bad setup to generate a narrow escape from the planet later. This is not a comment, it is a genuine answer. The answer is that the author just didn't come up with a better way of generating a narrow escape.
It was good that then Luke and Ben had to rush off the planet under fire to make for an exciting escape. But it wasn't so good in that a critical viewer would realize that Ben Kenobi has various more subtle tactics to defend them. He'd used more subtle tactics just prior and remained undetected. Why wouldn't he use subtle tactics again and remain undetected right up until they left? Why not just wave his fingers and say, "my friend is just a goofy teenager, not worth your time to bother with."
So, sorry, it was an imperfection in the plot.
In "Star Wars: The Jedi Path" (Daniel Wallace, 2011) There is clear mention of how a lightsaber should be used to incapacitate an opponent. In brief removing an arm is considered a last resort when simply slicing the weapon is less damaging (and therefore more honourable/aligned with the Light path). Removing an opponents arm is usually reserved for dueling when the opponent is still dangerous without a weapon (Dooku removing Anakin's arm, Vader removing Lukes.)
So as to 'why' Kenobi removed his arm in the situation when he had every opportunity to just destroy the weapon probably requires another question to be asked. Three possibilities are a) Luke was in immediate danger, and possibly just destroying the blaster wouldn't get the point across (perhaps the attacker had other weapons). b) perhaps it would have started a riot if he didn't show everyone else in the cantina he was serious. c) as mentioned above, it was simply convenient for the scriptwriters.
Slightly off topic, but shortly after the scene we see Han shoot the bounty hunter. This sets up a contrast with Kenobi (who 'could' have just as easily killed his opponent but did the more honourable thing of 'only' removing his arm). This contrast is then continued during the trip to Alderaan, when Kenobi is schooling Luke in the ways of the force, while Han is deriding most of what he's being told as religious rhetoric.
So to answer the original question, in the brief seconds he had to appraise the situation, Kenobi realised that mind tricks wouldn't work, and serious (yet non-lethal) action was required. Even simply destroying the weapon would have been more in line with Jedi teachings (as would avoiding the confrontation and breaking his cover in the first place) but the situation had moved beyond a peaceful resolution.
- Obi-Wan doesn't choose to use the saber, but he's left no other choice. He first tries to use diplomacy/bribe/suggestion, saying "This little one's not worth the effort. Come, let me get you something." Luke then gets thrown across the room into a table, and the two thugs draw blasters. The bartender cries out a warning about the blasters and dives for cover. Obi-Wan watches them for a half-second as they start to attack, then slices them up. What else would/could Obi-Wan have used at that point, that would have been preferable?
- The jumbled riff-raff and scum in the cantina may likely not not know about Jedi, or their weapons, or even if they do, may not think that the Empire would be interested, or that they would reward being given information. The Jedi are supposed to be extinct, so someone with a lightsaber is probably just another dangerous weirdo.
- That cantina was clearly a place where patrons fighting and even killing each other wasn't that uncommon or particularly disturbing to the patrons or owner, especially if you paid a cleaning fee. That's why Obi-Wan (who knows the place) goes there arrange a no-TSA flight to Alderaan. So it's not unreasonable to expect that lightsaber use could go unreported, at least for long enough to escape the planet.
- As seen in the "not the droids you're looking for" scene, the Imperials are questioning everyone about droids, not Jedi or lightsabers. The Imperials themselves have no idea there is a Jedi around, yet.
- Many of the other patrons likely have their own secrets and are probably not anxious for Imperial attention, either. So even if someone did make the connection that that was an old Jedi weapon, so the Imperials might reward information about it, most people that informed who would be in that cantina would tend to be unlikely to go to the Imperials with it, unless they're a professional informant or bounty hunter.
- Obi-Wan knows how to handle the aftermath, too. As Obi-Wan says, "the Force can have a strong influence on the weak-minded" - he may be able to use the Force to suggest that people not dwell on the type of weapon he used, and suggest that they go with their instinct to not mess with the guy who just cut two dangerous thugs down. He is also perceptive and resourceful and can likely size up whether anyone is thinking of running to the Imperials crying lightsaber.