Nick Clegg was told there is a "real risk" terrorists could avoid prosecution if internet monitoring powers are abandoned.
The Deputy Prime Minister blocked the inclusion of the Communications Data Bill – dubbed a "snooper's charter" by critics – from the Queen's Speech, claiming it was "disproportionate" and "unworkable".
Pressure for the powers to be introduced re-intensified in the wake of the killing of soldier Lee Rigby in Woolwich.
Foreign Secretary William Hague told MPs yesterday there remained a "very strong case" to extend monitoring of online activity as he was quizzed over reported UK intelligence use of a secret US internet spy programme.
In a letter to Clegg seen by The Sun newspaper and dated April 23, before the Queen's Speech, Keir Starmer warned technological advances "are reducing the communications data we have had available under the current legislative framework”.
"Investigators and prosecutors need to maintain the capability that we have, and if there is a reduction, there is a risk it may jeopardise future prosecutions," the DPP told him.
"Communications data is used to support prosecutions for a range of criminal offences. But for cases such as counter terrorism, organised crime and large scale fraud, I would go so far as to say that communications data is so important that any reduction in capability would create a real risk to future prosecutions.
"It is also important evidence in cases such as offences such as stalking and harassment which can cause great distress to the individual victim. I will be sending you case studies as examples in due course.
"Of course there needs to be strong safeguards in place to ensure that communications data is not misused, and the existing legislative framework provides a good basis for proceeding and ensuring there is public confidence in how the data is utilised."
Hague told the Commons: "There is a very strong case for updating the tools we have at our disposal. Means of communication are changing more rapidly at any time in the history of the world and that means the range and nature of threats changes.
"We must be careful to do that work and the whole House should give fair consideration to such proposals."
An opinion poll suggested a narrow majority in favour of the legislation, with 43 per cent backing police and security service access to individuals' internet use and another 8 per cent saying the powers should go further still to cover the content of messages.
The YouGov survey for the Huffington Post website found that 38 per cent of voters considered it an unjustified invasion of privacy.
There was a similar split over whether it was acceptable for the British intelligence services to use information obtained from the US that was gathered in ways illegal in this country.
Those pleased with any such move numbered 46 per cent while 39 per cent said they would be "sorry that the UK agencies might be getting round British law to undermine our right to privacy".
There was also a significant minority, 42 per cent, in favour of UK agencies going "beyond the law" if required to obtain information useful to prosecuting terrorists and other serious criminals.
Slightly more, 45 per cent, argued that they should "always obey the law". YouGov questioned 667 people.
David Cameron's official spokesman said: "The Government is considering how best we ensure that the relevant authorities and agencies are able to keep up with developments in technology, which is a fast-moving area.
"That process of policy development is continuing and once it is complete, we will set out the approach."
Asked whether Mr Cameron was concerned that terrorist prosecutions may fail if the proposed internet monitoring powers are dropped, the spokesman replied: "The Prime Minister has been really clear about the importance in this fast-paced area of the authorities, including the police and other agencies, having the tools that they require.
"It is well-known that communications evidence has a very important part to play in a number of the types of prosecutions to which you were referring. It's clearly very important that the appropriate measures are in place, and that's what the Government is actively considering."
A Liberal Democrat spokesman said: "There are already substantial powers in place to track the communications of criminals and terrorists and no one is suggesting taking them away.
"What the Liberal Democrats have said will not happen in this Government is a massive extension of those powers. Plans to pass a law to force companies to keep a record of every website everyone in the country has ever visited and all their interactions with social media sites were neither workable nor proportionate.
"As stated in the Queen's Speech, the Government will continue to work to address some of the challenges posed by new technology, such as the availability of IP addresses."