There's plenty of sound advice on the web on the subject of giving good research presentations. This post is about how to ask good questions when you're on the receiving end of a presentation. These suggestions are based on my admiring observations of exemplary behavior at a variety of good computer-science conferences such as Oakland, ASPLOS, and SIGCOMM.
Before you even start: don't ask a question just to advance your own agenda or to hear yourself speak. Put yourself in the speaker's shoes. Don't steal the spotlight.
Use the microphone. Most conferences set up microphones for audience feedback and session recording; not every session chair reminds you to use them. Use them if they're available, or else risk annoying literally everyone else in the room.
State your name and affiliation clearly before asking your question. Rule of thumb: a native speaker of the conference's language who should be able to write down your name—at least phonetically—right after you say it. Many conferences employ an army of bushy-tailed volunteer scribes who must faithfully summarize questions and answers after each talk. Make it easy for them to attribute your brilliance to you.
Offer a compliment. Even if you hated the work or the talk, remember that the program committee found enough merit in the work to accept it, and you've implicitly put your faith in the PC by choosing to attend. Even a quick phatic "Nice work. [Remainder of question]" suffices to establish a professional tone and put the speaker at ease.
Be ready to take it offline. It's a matter of social courtesy to leave time for other questioners. Don't ask a followup question unless you're sure the answer will be quick (e.g., yes or no). As a courtesy to the speaker, if you've asked a difficult question that requires a long answer or leaves the speaker twisting in the wind, feel free to short-circuit the answer and suggest an offline discussion.
Say thanks. Again, put yourself in the speaker's sweaty shoes. Answering questions after a talk is hard.
Disclaimer: I have no idea whether other fields have different customs or social norms. I've heard that academic child psychologists, for example, are required to use hand puppets.