The prime minister also triggered another potential coalition row with Nick Clegg after he told MPs he wanted to "roll back" green taxes.
A confident Miliband seized on former Tory prime minister Sir John Major's call for a windfall tax on energy companies as evidence that Cameron was failing to address rising gas and electricity bills.
"The prime minister said anyone who wanted to intervene directly in energy markets was living in a Marxist universe," Miliband said. "How does he feel now the red peril has claimed Sir John Major?"
Cameron responded by accusing the Labour leader of being a "conman" who could not deliver on his pledge to freeze prices as he did not control global energy prices. However the prime minister was admonished by the Speaker after he repeated the charge more than once.
Bercow told Cameron over a raucous Commons: "The word conman is frankly unparliamentary and the prime minister is a man of great versatility in the use of language, it is a bit below the level."
Under attack from Miliband for failing to do anything to bring down energy prices, Cameron used PMQs to announce there would be a "proper competition test" to establish whether the energy market can be made more competitive.
Announcing the move, Cameron also signalled he wanted to "roll back" some "green" regulations which he said were driving up energy bills.
"I can tell the House today that we will be having a proper competition test carried out over the next year to get to the bottom of whether this market can be made more competitive," he said.
"I want more companies, I want better regulation, I want better deals for consumers. But yes, we also need to roll back the green charges that he put in place as energy secretary. We need to roll back the costs that have been imposed on people's energy bills, part of which he was responsible for."
His comments threatened to put him at odds with his Liberal Democrat coalition partners who have made clear they are firmly opposed to any move to get rid of existing green tariffs.
Miliband also hit out at Cameron for his criticism of green taxes. "Who said 'vote blue, go green'?" Miliband asked, recalling the Tories pre-election campaign slogan.
Also on HuffPost:
Tory MP Simon Burns on John Bercow
<em>"Stupid, sanctimonious dwarf"</em>
David Cameron on Ukip
<em>"fruitcakes, loonies and closet racists, mostly"</em>
Winston Churchill on Clement Attlee
<em>"A sheep in sheep's clothing."</em>
Vince Cable on Gordon Brown
<em>"The House has noticed the prime minister's remarkable transformation in the last few weeks from Stalin to Mr Bean"</em>
Gordon Brown on Labour-voting Gillian Duffy
<em>"A bigoted woman"</em>
Barack Obama on Donald Trump
<em>"He can finally get back to focusing on the issues that matter, like ‘Did we fake the moon landing?’ ‘What really happened in Roswell?’ And, ‘Where are Biggie and Tupac?’”</em>
Denis Healey on Geoffrey Howe
<em>"like being savaged by a dead sheep"</em>
David Cameron on Mitt Romney
<em>"Of course it's easier if you hold an Olympic Games in the middle of nowhere."</em>
Tony Blair on the Welsh
Nigel Farage on EU President Herman Van Rompuy
<em>"I don't want to be rude but, really, you have the charisma of a damp rag and the appearance of a low-grade bank clerk"</em>
Labour MP Tony Banks on Margaret Thatcher
<em>"the sensitivity of a sex-starved boa-constrictor"</em>