The user requirements in the future wireless networks are heterogeneous. The resource allocation and user association are crucial factors to meet user requirements and save energy. In this paper, the optimization of resource allocation and user association problem in both low data and high data requirement scenario is studied. In the low data requirement scenario, a network energy consumption minimization problem which considering the signal-to-interference-plus-noise ratio coverage constraints and jointly determines the optimal density of micro base stations (mBSs) and the optimal association bias is formulated. The closed-form solution of the optimal mBSs density and association bias is derived, respectively. Optimal association bias grows like $O( {\lambda _{u}^{ - ({\alpha }/{2})}} )$ as a function of user density $\lambda _{u}$ ( $\alpha $ is path loss factor) and the optimal density of mBSs is a linearly monotone increasing function of the user density. In the high data requirement scenario, a rate coverage maximization problem by adjusting the bandwidth allocation and user association are investigated. The relationship between bandwidth allocation and user association bias is obtained and a dynamic gradient iterative algorithm is used to solve the maximization problem. Simulation results verify the relevant derivations and demonstrate the user density and requirement have an important influence on the optimal resource allocation and optimal association bias.