Depending on how you define it, Buffy may or may not have actually gone "to Hell".
In the Season Three premiere, Anne, Buffy has run away to Los Angeles and is posing as a waitress. During that episode, she is captured and taken to an alternate dimension that is one of the "hell dimensions", the so-called Factory Dimension. This dimension is a pretty good fit for a general description of hell:
However, it's not intended to be hell as in the afterlife, a place where souls go when they die, so it probably doesn't count. Many other such hell dimensions exist, though I don't think Buffy ever visits one explicitly.
Death and Rescue
More likely, you're remembering the discussion that was had during the Season Six premiere episode, "Bargaining, Part One". Buffy has been dead for about 5 months at that time, and the Scooby gang is trying to get along without her. They presume that she is trapped in Hell, and they rescue her, though she comes back in a very bad state.
She later "confirms" their belief that she was in hell for them:
BUFFY You brought me back. I was in a place ... I was in Hell. I don't ... I can't think
much about what it was like. But it felt ... I felt like the world abandoned me there.
And then suddenly you guys ... You did what you did.
Of course, she later tells Spike that she was in Heaven, not Hell, but swears him to secrecy on that point.
As far as why they believed that, it's mostly because they didn't know what had really happened to her. The last they saw of her, she had gone through a portal while trying to defeat Glory. Their only experience with this kind of event is what happened to Angel when Buffy pushed him into Acathala's dimension, as Willow points out:
WILLOW: Her body, yeah. But her soul ... her essence ... I mean, that could be somewhere else. She could be trapped, in-in some sort of hell dimension like Angel was. (tearfully) Suffering eternal torment, just because she saved us, and I'm not gonna let ... I'm not gonna leave her there.
At the same time, there is an undertone of desperation on their part. They are not handling her absence well, and are looking for a reason to justify trying to bring her back. Convincing themselves that they are rescuing her from hell is as good a motivation as any.