This can be summarised in one golden rule:

Contact your current energy supplier in good time – before you move – and tell them that you are going to move.
They can explain what steps you have to take, as this may differ from one energy supplier to another.

Note down your meter readings with the old or new occupant.

More details can be found on the page ‘Moving house’.