This paper proposes a fundamental model for defining and optimizing distributed energy flexibility in distribution buses, as well as deliverable energy flexibility as the aggregate distributed flexibility that is available for offering to the day-ahead energy market by distribution system operators (DSOs), without jeopardizing the operational constraints of the distribution network. The distributed energy flexibility is provided by flexible loads in distribution buses, which are modeled by clustered queuing systems representing the aggregation of large population of flexible loads with different energy and service quality requirements. Further, controllable inverters interfacing distributed solar generation provide reactive power flexibility in distribution buses. The deliverable energy flexibility is optimized by the proposed model that coordinates the energy flexibility of queued flexible loads and controllable inverters to maximize DSO's profit of participating in the day-ahead energy market, while satisfying the service quality constraints of flexible loads, the operational limits of controllable inverters, and power flow constraints of distribution network that are formulated using the branch flow model. Moreover, an index is proposed to calculate the contribution of each distribution bus in providing the deliverable energy flexibility. The proposed model is implemented on the IEEE 33-bus distribution network. The numerical results exhibit profit opportunities for DSOs from providing the deliverable energy flexibility in the day-ahead energy market.