To somehow expand alexwlchan's answer I've tried to gather some information about Cedric's Hufflepuff qualities. I will focus on, why Cedric is in Hufflepuff, not why he is not in Ravenclaw. First let me cite the the Sorting Hat:
You might belong in Hufflepuff Where they are just and loyal,
Those patient Hufflepuffs are true
And unafraid of toil;
Harry Potter and the Philosopher's Stone
For Hufflepuff, hard workers were
Most worthy of admission;
Harry Potter and the Goblet of Fire
Now about Cedric (from the Prisoner of Azkaban):
Looks like he's not misusing his appearence or built, but remains humble/silent.
“He’s that tall, good-looking one, isn’t he?” said Angelina.
and silent,” said Katie, and they started to giggle again.
The before-match-handshake differs from those with Slytherin, when they try to crush each others hand:
The Captains walked up to each other and shook hands; Diggory smiled
at Wood but Wood now looked as though he had lockjaw and merely
He is talented in Quidditch, a bit like Harry himself:
He’s an excellent Seeker!
He is fair-player, which tells a great deal about his personality:
“Diggory got the Snitch,” said George. “Just after you fell. He didn’t
realize what had happened. When he looked back and saw you on the
ground, he tried to call it off. Wanted a rematch. But they won fair
and square... even Wood admits it.”
As a Quidditch player he knows how broom is important, and understands the Harry's loss:
Cedric Diggory came over to congratulate Harry on having acquired
such a superb replacement for his Nimbus,
And from the Goblet of Fire:
The situation before Quidditch World Cup:
Ced, that’ll be something to tell your grandchildren, that will....
You beat Harry Potter!”
Harry couldn’t think of any reply to this, so
he remained silent. Fred and George were both scowling again. Cedric
looked slightly embarrassed.
“Harry fell off his broom, Dad,” he
muttered. “I told you... it was an accident....”
“He’s not an idiot. You just don’t like him because he beat Gryffindor
at Quidditch,” said Hermione. “I’ve heard he’s a really good student —
and he’s a prefect.”
He is not angry with Harry entering the Triwizard Tournament, although he probably does not believe him:
“So,” said Cedric, with a slight smile. “We’re playing against each
“Ah... okay,” said Cedric. Harry could tell Cedric didn’t believe him. “Well... see you, then.”
He wasn’t attracting nearly as much unpleasantness in the corridors
anymore, which he suspected had a lot to do with Cedric — he had an
idea Cedric might have told the Hufflepuffs to leave Harry alone, in
gratitude for Harry’s tip-off about the dragons. There seemed to be
fewer Support Cedric Diggory! badges around too
“Listen . . .” Cedric lowered his voice as Ron disappeared. “I owe you
one for telling me about the dragons.
“Tell you what,” Cedric said, “use the prefects’ bathroom. Fourth door
to the left of that statue of Boris the Bewildered on the fifth floor.
Password’s ‘pine fresh.’ Gotta go... want to say good night —”
The Triwizard Cup, final steps:
“You take it. You should win. That’s twice you’ve saved my neck in
He stepped over the spider’s tangled legs to join Harry, who stared at
him. Cedric was serious. He was walking away from the sort of glory
Hufflepuff House hadn’t had in centuries.
“Go on,” Cedric said. He
looked as though this was costing him every ounce of resolution he
had, but his face was set, his arms were folded, he seemed decided.
And finally Dumbledore's speech:
“Cedric was a person who exemplified many of the qualities that
distinguish Hufflepuff house,” Dumbledore continued. “He was a good
and loyal friend, a hard worker, he valued fair play. His death has
affected you all, whether you knew him well or not. I think that you
have the right, therefore, to know exactly how it came about.”
Together I think he had a bit from everything. He was brave, clever, hard-working, talented, humble. He was not that much ambitious, he knew how to lose. That's why I think he fits in Hufflepuff.