Is the close result of the 2010 race attributed more to Nikki Haley's flaws or the strength of Sheheen as a candidate?
Mostly due to the extreme unpopularity of Republican Gov. Mark Sanford. Haley was his hand picked successor. But Sheheen is a very good campaigner, and very bright too.
What has Haley done to make her so unpopular anyway?
Well, she's continued Mark Sanford's destruction of state government, so much so that even conservative Republicans are shaking their heads. Just recently there was a scandal when the state tax department was hacked which put millions of peoples' credit card info in danger. Basically a result of Haley/Sanford choking state gov't with lack of funding - they couldn't afford to get new computers or anti-hacking software.
Haley has also been at odds with the SC Republican legislature. Many of them hate her; notably one of her extreme proposals was absolutely destroyed by the house, failing 0-115. This is the same legislature that tried to impeach fellow Republican Mark Sanford.