Secure key establishment is a fundamental security service in wireless sensor networks. It enables sensor nodes to secure their communications from malicious eavesdropping or tampering. However, due to restricted computing power and limited memory space, traditional public key cryptosystems may not be applicable to sensor hardware. To address this problem, we propose a lightweight distributed key agreement protocol, which enables each sensor node to establish shared secret keys efficiently with its neighboring nodes without the computation of modular exponentiation like in public key cryptosystems. Our protocol utilizes one-way hash function and bit-wise comparison operations, which are efficient and feasible for sensor hardware. The results showed that our approach provides better secure connectivity with lower redundant storage cost than existing schemes.