If you mean laptops,cameras ,mp3 players etc or even just loose spare batteries for these products then yes it is safe and ok to have them in hand luggage
I think the fact that you can buy a packet of batteries at the airside Boots stores suggests that there is no risk whatsoever to carrying them on board an aircraft, whether installed in a device or not.