Paragraph 3(1) of Schedule 6 to the Electricity Act 1989 makes a deemed contract between the electricity company and the owner of the premises the moment the premises become unoccupied:
3.— (1) Where an electricity supplier supplies electricity to any premises otherwise than in pursuance of a contract, the supplier shall be deemed to have contracted with the occupier (or the owner if the premises are unoccupied) for the supply of electricity as from the time (“the relevant time”) when he began so to supply electricity.
Therefore, from the moment the property is unoccupied, there is a deemed contract between the owner and the supplier. The same principle applies between the occupier and supplier the moment the property is occupied.
There are similar provisions for gas.
If the landlord and owner are one and the same, then yes the landlord is liable.