Heterogeneous networks provide flexible deployments for operators to improve spectrum efficiency and increase coverage. However, driven by new generation wireless devices, the exponential increase of data traffic has triggered new challenges of wireless networks to meet the green communications requirement. Therefore, energy-efficient design has emerged as a promising technique in heterogeneous networks. In this paper, we investigate the energy efficiency maximization problem for downlink transmissions by jointly considering user association and power allocation in a two-tier heterogeneous network with multiple small cells. We first consider a system model without the co-channel interference between small cells. The energy efficiency maximization problem is formulated under certain prescribed quality-of-service requirement and maximum power limit constraint. The original optimization problem is non-convex and NP-hard, and it involves integer programming. We first relax the formulate problem into a continuous one and decouple it into user association and power allocation subproblems. A gradient-based algorithm is used to solve the power allocation problem. Then, an iterative joint user association and power allocation algorithm is proposed to achieve the maximum energy efficiency. Moreover, we consider a more sophisticated system with the limited bandwidth resource, in which multiple small base stations require to share the same frequency band to serve users, and the co-channel interference is introduced. Inspired by the original Dinkelbach method, we use a lower bound approximation and the Lagrangian approach to derive a closed-form expression of power allocation, which reduces the computational complexity. Simulation results show that the proposed algorithms have improved energy efficiency when compared with other the existing schemes.