Cameron is ultimately responsible. He never actually wanted to give the referendum and only did for party reasons, not because he thought it was best for the country. His then cowardly resignation was disgusting, especially after saying he would stick it through. Honestly history will not look kindly on him.
Having said that, I also have little sympathy for Theresa May. While it was an impossible situation, she made things far worse and got herself into trouble constantly. She never actually took a side in reality and meekly towed the party line to set herself up as the neutral candidate in the leadership contest. She then triggered article 50 to try and show she was getting on with Brexit, even though she didn't have a plan in place and so gave herself a two year deadline that made any negotiation restrictive and put Britain in the weaker position. After that she then called a election when the polls were up and she smelt blood in the water to boost her own party's fortunes, whilst claiming it was for Brexit. She was dealt a bad hand, but played it atrociously on top.