Google’s official position on this question is that social media does not directly affect SEO.
Google knows that it can be easy to manipulate social signals. Shares and likes can be purchased on the cheap and therefore are not reliable factors.
Genuine social media activity can influence rankings indirectly, however. Shares that are genuine indicate that more people are seeing your content, which leads to more shares, more mentions and increased brand recognition.
All of these off-page SEO factors do indirectly impact your rank, at the end of the day.