The ruling, prompted by petitions from Israeli rights groups, declared that withholding food had left Palestinian detainees malnourished and amounted to a violation of basic legal obligations.