Pregnancy test

When is a good time to take a pregnancy test? First thing in the morning or what time of day or anytime?