The victory ended the Hornets' run of four successive defeats, while defeat leaves Posh five points off the play-off places.
Mark Yeates' fourth-minute strike was the first of five goals scored in an enthralling opening 45 minutes.
Lee Frecklington's rasping effort put the visitors on level terms before Sordell scored twice in three minutes to put Watford 3-1 up, only for Emile Sinclair to reduce the deficit six minutes before half-time.
In the second half, a fine save from Paul Jones denied Sordell a hat-trick but Watford held on for just their second league win at Vicarage Road this season.
Darren Ferguson's side came into the game having failed to record a clean sheet this season and they fell behind just four minutes in.
Sordell fed the ball in from the right and a poor clearance from the Peterborough defence landed at Yeates' feet on the edge of the penalty area.
The striker drilled a first-time effort past the outstretched arm of Jones which nestled in the bottom corner.
Peterborough equalised 10 minutes later courtesy of a scintillating finish from Frecklington.
The visitors began deep in their own half before Frecklington picked up the ball on the right flank.
He beat Hornets left-back Carl Dickinson by quickly switching the ball from his left foot to his right, before rifling the ball straight into the top corner of the net.
Minutes later Grant McCann's free-kick struck a post after the dangerous Frecklington had been felled by Craig Forsyth.
But McCann was to have a more telling contribution at the other end, conceding the set-pieces which provided Watford with their second and third goals.
The hosts were level in the 31st minute when Sordell dispatched a penalty after Posh's captain tugged Prince Buaben's shirt in the area.
McCann needlessly brought down Buaben again two minutes later and Sordell made him pay, flicking a header over Jones and into the net from Yeates' free-kick.
Sordell nearly completed a first-half treble but fired wide and Sinclair then ensured Peterborough went into the interval just one goal down.
Paul Taylor beat three men with a meandering run before squaring for Sinclair who stroked the ball into the far corner from just inside the area.
More goals always looked likely but there were few chances in the second period.
Yeates repeated McCann's feat of hitting the woodwork with a free-kick and Jones reacted instinctively to deny Sordell from the rebound.
At the other end, Sinclair managed to round Watford goalkeeper Scott Loach but lost control of the ball and a late deflection diverted Taylor's strike just past the post.