Yes, says Avi Bell (updated version here). No, says twelve other scholars in Israel. This is a purely hypothetical question because Israel has expressed no intention of shutting down the flow of electricity into Gaza, and probably wouldn’t gain anything by doing so. But since you asked….
International law does not bar a belligerent from cutting off electricity. Indeed, a belligerent is free to bomb the power plants of its enemy, as the United States has recently done in Iraq and Serbia. Gaza has only a few power plants and receives most of its electricity from Israel. Israel could cut off electricity even if it were not at war with Gaza, just as it could refuse to trade with Gaza. Being at war with Gaza, it could not only shut off electricity, it could blow up Gaza’s plants.
A possible counterargument would be that Israel occupies Gaza. An occupier normally must maintain services for the people living in occupied territory. So one question is whether Gaza is occupied. No: Gaza has its own government and own militia. Yes: Israel controls the borders and can intervene at will. I think the better answer is No–Gaza is blockaded and besieged but not occupied.
But the 12 authors don’t argue that Israel occupies Gaza. Instead, they argue that Israel has certain obligations to Gaza because Israel used to occupy Gaza and since withdrawing has prevented Gaza from developing infrastructure by blockading it. There is an Israeli Supreme Court case that lends credence to this theory, but international law does not. There is no legal authority for the principle that a belligerent that has withdrawn from a country has any obligations toward it that arise from the former occupation. Nor can the authors cobble together a description of the contours of those obligations if they did exist, so even if Israel owed obligations toward Gaza of some sort, it would hardly follow that it cannot cut off electricity if it believed that doing so advanced a legitimate military objective.
I suspect that Israel has sensible political reasons for not cutting off electricity, and so let us hope that this debate remains theoretical.