Unmanned aerial vehicles (UAVs) can provide an effective solution for improving the coverage, capacity, and the overall performance of terrestrial wireless cellular networks. In particular, UAV-assisted cellular networks can meet the stringent performance requirements of the fifth generation new radio (5G NR) applications. In this paper, the problem of energy-efficient resource allocation in UAV-assisted cellular networks is studied under the reliability and latency constraints of 5G NR applications. The framework of ruin theory is employed to allow solar-powered UAVs to capture the dynamics of harvested and consumed energies. First, the surplus power of every UAV is modeled, and then it is used to compute the probability of ruin of the UAVs. The probability of ruin denotes the vulnerability of draining out the power of a UAV. Next, the probability of ruin is used for efficient user association with each UAV.Then, power allocation for 5G NR applications is performed to maximize the achievable network rate using the water-filling approach. Simulation results demonstrate that the proposed ruin-based scheme can enhance the flight duration up to 61% and the number of served users in a UAV flight by up to 58%, compared to a baseline SINR-based scheme.