We are all professionals and know how to do our job - but when it comes to estimating time - most of us will fall short.
Rule #1: Understand the task
Seems rhetorical, but take your time to really understand the task - is there any unspoken requirements we are missing? You'd be surprised how many time there is at least one.
Rule #2: Divide into micro-tasks
Look at your task and divide it into smaller tasks, to make it manageable. This way, you can estimate each micro-task and adding all up will give you the total estimation.