1) Break down the tasks to no larger than a few days work, and hopefully smaller. The larger the pieces you are estimating, the more likely you are forgeting a task or step. So break it down into smaller bits.
2) Have someone look over your estimate. Or have them put together their own estimate separately. If you both come to roughly the same numbers, you can feel more confident about your numbers.
3) On medium-sized or larger projects, encourage customers to build in a change budget up front. Then, you've got a place to go for the funds when a change is required, and your customer contact doesn't necessarily have to get lots of approval from others.
4) A lot of people build a "fudge factor" into their estimates. I recommend adding a buffer based on your confidence in the estimate. For example, if I'm familiar with the customer and am comfortable with how they work, my confidence is higher and my buffer might only be 5% or 10% of my total estimate. But if I'm less familiar with the customer, or the technology, or something else decreases my confidence level, I might add a buffer of 25% or more.
5) The people who will actually write the software should create the estimates. Different developers have different skill sets and levels. What might take one developer 2 hours might take another 10.
6) Historical information is the best predictor of the effort required to develop software. Look at past similar projects for clues on a new estimate.