What is the right time to have sex without getting pregnant?

Know your ovulation. The rhythm method of birth control hinges on you knowing when you ovulate, and avoiding sex during that time. Basal body temperatures can help, but if you cannot figure out when you ovulate, you will not be able to predict the best time. Generally, you ovulate in the middle of your cycle, about 2 weeks from the first day of your period.
Not wanting a baby. The best time in your cycle to have intercourse to avoid pregnancy is immediately before your menses. You are most fertile 10-14 days following your menses. After that it the chance of successful ovulation is less.