In the domain of communication technologies, the Device-to-Device (D2D) communication becomes a predominant technology for the implementation of 5G communication system and Internet of Things (IoT) applications. In D2D communication Network, resource allocation and power management are the key areas of interest with ensuring the Quality of Services (QoS). Firstly, we propose the power control problem which is a non-convex problem. By using the log transformation approach, the non-convex problem converts into the convex optimization problem. Robust distributed power control method is further utilized for the power optimization at both ends (base station and D2D user) for underlay Inband D2D communication, where the cellular user and D2D user both use the cellular spectrum. After the power control, resource allocation is done to maximize the energy efficiency by 66.67% for the D2D system. Our proposed work provides new insight to power control techniques in D2D communication. Numerical analysis of the proposed algorithm reflects the impact of robust distributed power control for maintaining the quality of services and enhancing the energy efficiency of the system.