You can switch as often as you like! There's no limit to how many times you can find a better deal (though you will likely be credit checked every time you switch).
Keep in mind that if you're on a fixed deal, you might have to pay an exit fee if you leave early. But even with an exit fee, switching could still save you a lot of money, especially if energy prices have dropped significantly since you fixed.
You won't have to pay an exit fee if you switch within 49 days of when your fixed deal is due to end, or if you're on a standard variable tariff (which you will be if you let a time-limited energy deal expire without switching again).