The way was clear for Vodafone to agree the acquisition after the only other bidder, Tata Communications, dropped out of the running last week.
Under the deal, Vodafone will pay 38p per C&WW share, valuing the company - which primarily operates fixed line networks - at £1.044bn.
Vodafone said that the acquisition will "strengthen the enterprise business of Vodafone Group in the UK and internationally and presents attractive network and other cost-saving opportunities for Vodafone Group".
Vittorio Colao, the chief executive of Vodafone Group, said in a statement: "We are pleased to reach agreement with the Board of Cable & Wireless Worldwide, who unanimously recommend our offer.
"The acquisition of Cable & Wireless Worldwide creates a leading integrated player in the enterprise segment of the UK communications market and brings attractive cost-savings to our UK and international operations.
"We look forward to working with the management and employees of Cable & Wireless Worldwide to combine our expertise for the benefit of our customers and shareholders."
CW&W provides networking and broadband for enterprise clients, essentially major organisations such as Tesco and the UK police force.
The company split from telecoms provider Cable & Wireless Communications (C&WC) in 2010, but it has struggled since the separation, and issued a number of profit warnings.
Vodafone said in February that it was "evaluating the merits" of a bid for the company to boost its enterprise division. But there has also been speculation that it will seek to sell off C&WW's undersea cable assets going forward.
> Vodafone challenges Ofcom's 4G mobile move