When is the best time to take a pregnancy test?

When is the best time to take a pregnancy test? Should I take it in the morning?