Of course good writing makes a difference, but as I said before, given one piece of good writing from a writer who is willing to use social media, and one where the writer isn't, the publisher will go with the first. In order for the quality of your writing to outweigh all this, it has to be not just good, not just excellent, but such that it sends a thrill through the editor's heart.
There will also be mediocre books that get published. They will be published because they are marketable -- they have the kind of story and characters that hosts of readers are longing for, not very discriminating readers who don't care much about the quality of the writing so long as there is plenty of the stuff that readers want (sex, romance, battles, government conspiracies, or whatever is appropriate for the genre in question) but readers nonetheless, who will lay out the money to buy that kind of book. These books may well be published whether the writer uses social media or not, but the ones that will be most successful will be the ones whose writers tirelessly self-promote using all the available media. These mediocre books will keep the publishers in business so that they can take an occasional risk on something they think is excellent but maybe not particularly marketable.
Really, it's the writer of excellent -- but not guaranteed marketable -- fiction that may need social media the most. That's the reality of it. If you want to write popular trash, you may be able to get away without it. You don't want to write marketable trash, so it's a question of what you are willing to do to give your good writing the best chance.