Electronic health monitoring is one of the major applications of wireless body area networks (WBANs) that helps with early detection of any abnormal physiological symptoms. In this paper, we propose and solve an optimization problem that maximizes the energy efficiency (EE) of WBAN consisting of sensor nodes (SNs) equipped with energy harvesting capabilities communicating with an aggregator. We exploit the structure of the optimization problem to provide a sub-optimal solution at a lower computational complexity and derive the mathematical expressions of upper and lower bounds of the source rates of the SN. The simulation results reveal that the optimal allocation of the source rate to energy critical SNs improves the system performance of WBAN in terms of energy efficiency during different everyday activities.