Electric heaters are 100% efficient. However, electricity generation is far less than this.
Burning combustible materials for heat is much more efficient than burning them for electricity.
That said, if your electricity comes from renewable sources, it’s better to use electricity. It’s best to use heat pumps rather than resistive heaters (e.g. space heaters), since those can move more heat than the energy they consume (for every watt of electrical power consumed, they can move 2.5-4 watts of heat power from outside to inside).
Latest Answers