Suppliers will also have to give customers more chances to clear their debts before making them switch.
It comes after debt agents for British Gas broke into some people's homes to fit meters, sparking an outcry.
But campaigners said the new rules did not go far enough and vulnerable people could still face forced installations.
Switching people onto prepayment meters without their consent has become more common since energy prices went up.
It can be done by warrant or remotely via smart meters, with suppliers saying it may help indebted customers manage their spending.
But campaigners say prepayment meters - which must be topped up - leave vulnerable customers at risk of running out of credit and losing access to light and heat.
Ofgem placed a temporary ban on all forcible installations after the Times newspaper exposed the practices at British Gas.
The BBC understands that on Tuesday at 7am, the regulator will announce that all energy suppliers in England, Scotland and Wales have signed up to a code of conduct that sets out the practices they should adhere to when fitting the meters.
Under the rules, first reported by the Guardian, suppliers will now have to make at least 10 attempts to contact a customer - and conduct a "site welfare visit" before a prepayment meter is installed.
Representatives fitting them will also have to wear body cameras or audio equipment to make sure the rules are followed.
In addition:
* Suppliers will not be allowed to fit meters for customers over 85 or anyone with a terminal illness. Those with health conditions such as chronic bronchitis, emphysema and sickle cell disease, which could be worsened by living in a cold home, will also be exempt.
* Those forced onto a prepay meter - either by warrant or remotely - will be given £30 of credit initially to reduce the risk of them losing supply.
* Suppliers have also been told to identify where meters were wrongfully installed and to return the customer to their previous tariff and offer compensation.
However, there are concerns the rules will only protect the highest risk individuals.
According to the Times newspaper, for vulnerable customers in a "medium risk" category, suppliers will be required to carry out further risk assessments but can still go ahead with forced installations if they consider them justified.
Medium risk individuals could include elderly people aged between 75 and 84, parents of children under five years old, pregnant women and people with Alzheimer's disease among other conditions.
Simon Francis, coordinator of the End Fuel Poverty Coalition, said the new rules "do not go far enough".
"What about elderly people below the age of 85? Also some disabled people could still miss out - people using power to charge their wheelchairs, for example. There will be people who aren't covered."
Tom Marsland, the policy manager at the disability equality charity Scope, said the rules will "still allow energy companies to install prepayment meters in some disabled households". The charity is calling for an outright ban.
An estimated 600,000 people were forced to switch to prepayment meters after struggling to pay their bills in 2022, according to a Citizens Advice report in January. That is up from 380,000 in 2021.
At the time, its boss Dame Clare Moriarty said: "All too often the people finding it hardest to pay their bills are being forced onto a prepayment meter they can't afford to top up. This puts them at real risk of being left in cold, damp and dark homes."
In March, the government brought charges paid by prepayment meter customers in line with customers who pay by direct debit.
It means more than four million households are set to save £45 a year on energy bills from 1 July, the government has said.
In the past, prepayment meter customers have paid more because energy firms pass on the costs of managing the meters.
Suppliers have called for the introduction of social tariffs to tackle unaffordable energy prices.
These would see certain groups on low incomes offered lower-cost deals, with the discount funded in theory by higher bills or taxation.
Ofgem has described social tariffs as a good option and said they are being discussed with ministers.