There's blame enough to go around. But you have to start with the candidate herself. Hillary Clinton was a historically unpopular candidate. Democrats lulled themselves with a comparison to the even more unpopular Donald Trump. They gambled that her unpopularity wouldn't matter. It did.
This unpopular candidate then ran a poor campaign. Rule one in political campaigning is to give voters a reason to vote for you. She never did. Her campaign focused on driving up Donald Trump's unfavorables. That became less and less productive. She needed to pair it with turning her own unfavorables around. She never did. She never explained to voters what she was going to do to improve their lives. She ran on a status quo platform. If you liked the last eight years, vote for her. Preserving Barack Obama's legacy wasn't enough. She needed to give voters something more to look forward to. She never did.
The Democratic Party deserves some blame as well. Pop quiz: name a populist movement on the left in the last eight years. If you said Occupy Wall Street, give yourself a sticker. The Democrats didn't exploit that populism by running against Wall Street. (Elizabeth Warren declined to run at all; Bernie Sanders ran and was rejected by Democratic voters.) Worse, the party nominated a candidate who was known for giving million dollar speeches in front of Wall Street audiences. Clinton was the anti-populist. The party thought it wouldn't harm them in the eyes of voters because the Republicans nominated a billionaire deeply enmeshed with bankers himself, both on Wall Street and in Russia. They were wrong. It did matter.
The media deserves some blame. Of course it's not their responsibility to get any particular candidate elected, or even to ensure that an unqualified candidate doesn't get elected. But this election demonstrates that the media no longer considers it its responsibility to encourage a well-informed citizenry or promote public accountability. Instead, the media treated Trump's outrageous behavior and Clinton's emails as clickbait. News is just another profit center for today's media.
Wikileaks and Russia deserve some criticism as well. It turned out that all were working to get one American political party's nominee elected. They succeeded. With the party of Ronald Reagan no less. It's shocking, but that's one of the cynical twists in this election that students of history will struggle to understand decades from now. "Politics makes strange bedfellows" doesn't begin to cover it.
Finally, the American voters bear much responsibility. The country just elected a racist, misogynist, narcissist, authoritarian, Putin-allied, sociopathic bully. In many voters' minds, not only wasn't any of that disqualifying, it turned out to be what they were looking for. The other half of the country couldn't believe that could ever happen in America. They were wrong. And that's maybe the most important reason of all why she lost.