The six-figure deal gives O2 on- and off-air promotion connected to the events, which are being staged by Capital Radio Group-owned radio stations including Southern FM, 96.4 BRMB, Invicta FM and Red Dragon.
It also includes branding at the London party to be held at London's Hyde Park on July 6. The official sponsor for the London event, being staged by 95.8 Capital FM, is make-up brand Rimmel for the second year running.
The O2 sponsorship of the events is part of the mobile phone firm's "In the City" summer drive, which will also see the company support two concerts in Scotland and events to support O2's community investment programme "Can Do".
O2 marketing director Suzi Moore said: "Each event features the hottest artists and will be themed with an interactive O2 Zone where people can experience O2's latest products."
Anna Pennington, who was recently promoted to head of sponsorship and promotions at Capital Radio Group as part of a restructure of its commercial operations, said the deal would enable the mobile network to reach a young audience.
She said: "Party in the Park is a great opportunity for O2 to tap into the Capital FM network's 15-34 core demographic. These parties are the highlight of the station's event calendar and we are delighted to be working with O2."
Capital Radio's Party in the Parks attract a total of 500,000 people. The events are in aid of the Prince's Trust charity.
If you have an opinion on this or any other issue raised on Brand Republic, join the debate in the .