Do links from Facebook and Twitter help the rankings in a search result? Possibly.
No one except the search engines really know just how much weight and how important a social media presence is for the search engine rankings.
There are, however, a lot of misinformation on the web about this:
links from almost all social media sites are nofollow’d, so they will not count as backlinks to increase a sites rankings
social media links and a social media presence are extremely important for traffic and site promotion even if they have no effect on search engine optimization
if the search engines did factor social media presence into the rankings, then how do they do it? Given that you can buy 1000 tweets or 1000 Facebook like for a few dollars, it is so easy to spam and its hard to believe that the search engine are so stupid that they actually factor that in!
if social media presence is factored in, I assume that only the tweets or likes from those who already have a significant social media presence (for eg, a high Klout score) will count (this is one way the search engines can ignore the social media spam – ie look at the credibility of those who do the tweets or the likes)
A social media presence is important, but just what it does for the search engine rankings is not clear. If it is important, it is getting likes and re-tweets from those with credibility are probably going to be the key.