The 54-year-old replaces Quique Sanchez Flores at Vicarage Road to become the Hornets' eighth manager in the last four years.
Italian Mazzarri arrives with plenty of coaching experience having managed Sampdoria, Napoli and Inter Milan amongst others in his home country.
Flores led Watford to a 13th place finish in the club's first season back in the Premier League and also took them to the semi-finals of the FA Cup where they were beaten by Crystal Palace.
But owner Gino Pozzo was said to be concerned by the Hornets' slump in the second half of the campaign and decided to make a change.
Watford's chief executive Scott Duxbury told the club's official website: "Walter has been the target of a number of approaches for his services, so we're delighted to secure him as head coach here at Watford.
"We're thoroughly looking forward to working with such a highly-regarded coach, with the progress and development of the club always remaining the highest priority."
Mazzarri has been out of work since leaving Inter in 2014 but reached the Coppa Italia final with both Sampdoria and Napoli, while also leading the latter to a runners-up finish in Serie A in 2012-13.