Wireless Sensor Networks (WSNs) are an emerging technology for monitoring physical world. The sensor nodes are capable of sensing various types of environmental conditions, have some processing capabilities and ability to communicate the sensed data through wireless communication. Routing algorithms for WSNs are responsible for selecting and maintaining the routes in the network and ensure reliable and effective communication in limited periods. The energy constraint of WSNs make energy saving become the most important objective of various routing algorithms. In this paper, a survey of routing protocols and algorithms used in WSNs is presented with energy efficiency as the main goal.