Unlike Hermione, Harry and Ron clearly understood that Gilderoy Lockhart was a useless blowhard who didn't know anything and had no useful skills (especially after coming to his office to tell him about the Basilisk and finding out he had no intentions of going to the Chamber and intended to run away; and didn't do any of the stuff in his books).
“What d’you want me to do?” said Lockhart weakly. “I don’t know where the Chamber of Secrets is. There’s nothing I can do.”
“You’re in luck,” said Harry, forcing Lockhart to his feet at wandpoint. “We think we know where it is. And what’s inside it. Let’s go.”
They marched Lockhart out of his office and down the nearest stairs, along the dark corridor where the messages shone on the wall, to the door of Moaning Myrtle’s bathroom.
So, why did they bother taking him with them to the Chamber of Secrets, instead of just stunning or petrifying him and leaving him around, either in his office or Myrtle's bathroom?
Interestingly, Lockhart himself asked that, but Harry didn't dignify him with an answer:
“Boys,” he said, his voice feeble. “Boys, what good will it do?”
Harry jabbed him in the back with his wand. Lockhart slid his legs into the pipe. “I really don’t think —” he started to say, but Ron gave him a push, and he slid out of sight.
Harry followed quickly. He lowered himself slowly into the pipe, then let go.
hat/tip Ikotica's amazing Harry Potter youtube reviews.