That depends on the battery technology. Older NiCd batteries often needed to be fully discharged before recharging to reduce the memory effect.
For modern battery types such as NiMH, Li-ion, and LiPo, full discharge is no longer necessary and is often discouraged.
Especially with Li-ion and LiPo batteries, deep discharge can damage the battery and may create safety risks. For most modern rechargeable batteries, it is best to recharge them when they are partially discharged rather than fully empty.