Knowing the time of sunrise and sunset for the area you are hiking and having a watch with you is something you should know and have.
However, if you don't know the time and cannot estimate the actual daylight, you can calculate the hours of light left with your hands. Reaching your destination before it gets dark is important.
To estimate when the sun will disappear behind a hill, mountain, horizon, etc. you have to:
1. Hold both hands at arms length, palms facing you and fingers horizontal.
2. Line up the bottom of the sun with the top of the upper finger with one hand, and the other hand lined up to the bottom of the other hand.
3. Count the number of fingers to the horizon.
4. Every finger is about 15 minutes of daylight left before the sunset.