The prime minister refused to say whether the government would introduce a windfall tax on the profits of energy companies.