A talk is often better for small conferences, as you are potentially able to reach a higher percentage of the audience. A poster often becomes more attractive as the conference gets bigger, because you’re actually more likely to hit your target audience. I’ve never given a talk at the massive Neuroscience meeting, for example. You have only a 15 minute window for a talk versus a 4 hour window for a poster. And given how many things are going on when a conference has tens of thousands of people, you stand a better chance of connecting the longer you're up there.
A poster is often a better option when a project is partially completed. You think you have a good story, but you’re not quite sure if there are missing pieces. You have a puzzle, and you’re not sure quite sure if the next step you want to take is the logical one. This is where a poster presentation can really benefit the presenter, because a poster presentation really lets your audience talk to you. As I wrote elsewhere:
A presenter is very close to the audience (typically only a handful of people at a time), which is much more conducive to audience members asking questions, volunteering ideas, etc. Poster sessions are lively places, with many warm greetings, casual conversation, and jokes in addition to the exchange of technical information.
Slide presentations are monologues (sometimes brilliant ones, to be sure); poster presentations are conversations.
Finally, some people are so terrified of speaking in public that they will always opt for a poster. A poster presentation is usually a much more low key and low stress affair.