With the rapid growth of Internet of Things (IoT) devices, the next generation mobile networks demand for more operating frequency bands. By leveraging the underutilized radio spectrum, the cognitive radio (CR) technology is considered as a promising solution for spectrum scarcity problem of IoT applications. In parallel with the development of CR techniques, Wireless Energy Harvesting (WEH) is considered as one of the emerging technologies to eliminate the need of recharging or replacing the batteries for IoT and CR networks. To this end, we propose to utilize WEH for CR networks in which the CR devices are not only capable of sensing the available radio frequencies in a collaborative manner but also harvesting the wireless energy transferred by an Access Point (AP). More importantly, we design an optimization framework that captures a fundamental tradeoff between energy efficiency (EE) and spectral efficiency (SE) of the network. In particular, we formulate a Mixed Integer Nonlinear Programming (MINLP) problem that maximizes EE while taking into consideration of users' buffer occupancy, data rate fairness, energy causality constraints and interference constraints. We further prove that the proposed optimization framework is an NP-Hard problem.Thus, we propose a low complex heuristic algorithm, called INSTANT, to solve the resource allocation and energy harvesting optimization problem. The proposed algorithm is shown to be capable of achieving near optimal solution with high accuracy while having polynomial complexity. The efficiency of our proposal is validated through well designed simulations.