The kettle is far more efficient in transferring energy to the water
than by boiling in a pan, however heat (or any other form of energy)
that comes from mains electricity has already been through an
inefficient stage of conversion from the energy source (usually heat)
so vast amounts of energy have already been lost through harnessing
and transmitting the power.
Overall, one kWh of heat from mains electricity typically results in
about 450-500g of CO2, wheras one kWh of heat released by burning
natural gas typically releases about 190g of CO2. So (if you assume
that the kettle is 95% efficient) even if you only capture 50% of the
energy released (by burning the gas) as heat in the water it is still
more 'carbon efficient' to boil the water.
I think it's a good point that mains electricity is partly from
renewable sources, but considering that renewable energy production as
a fraction of the total production is only around 4.7% it's not really
a bit effect.
Tim.