Harry was opposed to becoming a Slytherin for three primary reasons;
His visceral dislike of Draco Malfoy
The fact that he receives a very negative impression of Slytherin from his newfound friends; a former Gryffindor (Hagrid), two current Gryffindors, (Ron's older brothers) and a would-be Gryffindor (Ron)
The fact that the man who murdered his parents was in Slytherin House.
He takes an immediate dislike to Draco (who seems confident that he'll be joining Slytherin):
‘Well, no one really knows until they get there, do they, but I know
I’ll be in Slytherin, all our family have been – imagine being in
Hufflepuff, I think I’d leave, wouldn’t you?’
He learns (from Hagrid, whom he greatly admires) that Voldemort and most dark wizards and witches were members of Slytherin house:
Better Hufflepuff than Slytherin,’ said Hagrid darkly. ‘There’s not a
single witch or wizard who went bad who wasn’t in Slytherin. You-Know-Who was one.’
‘Vol– sorry – You-Know-Who was at Hogwarts?’
‘Years an’ years ago,’ said Hagrid.
Harry gives us a major insight into his thought process when he speaks to Ron. Clearly the whole "Voldemort was a Slytherin" thing is weighing heavily on his mind:
‘Gryffindor,’ said Ron. Gloom seemed to be settling on him again. ‘Mum
and Dad were in it, too. I don’t know what they’ll say if I’m not. I
don’t suppose Ravenclaw would be too bad, but imagine if they put me
in Slytherin.’ ‘That’s the house Vol– I mean, You-Know-Who was in?’
He learns a little bit more about Slytherin house from the Sorting Hat as it praises traits that he has little affinity for; cunning, ambition and a willingness for ends to justify means:
Or perhaps in Slytherin
You’ll make your real friends,
Those cunning folk use any means
To achieve their ends.
He notes that the Slytherins look less than nice (although by this point, he's already been substantially influenced against them):
‘Bulstrode, Millicent’ then became a Slytherin. Perhaps it was Harry’s
imagination, after all he’d heard about Slytherin, but he thought they
looked an unpleasant lot.
His new arch-nemesis was just sorted into that house.
Malfoy swaggered forward when his name was called and got his wish at
once: the hat had barely touched his head when it screamed,
‘SLYTHERIN!’
There's also a nice quote from the following book that indicates Harry's mental state
“Harry well remembered putting it on, exactly one year ago, and waiting, petrified, for its decision as it muttered aloud in his ear. For a few horrible seconds he had feared that the hat was going to put him in Slytherin, the house which had turned out more dark witches and wizards than any other – but he had ended up in Gryffindor, along with Ron, Hermione and the rest of the Weasleys.”
Harry Potter and the Chamber of Secrets, Chapter 5 (The Whomping Willow)
Within the film version, it's also worth noting that when Minerva MacGonagoll reads out the names of the houses, there's more than a little disgust in her voice when she mentions Slytherin House. Harry would certainly have noticed.