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.