What are the times a year a man and woman can’t be with each other?
Aside from the times when she is a niddah and on the “onos”, the only time a husband and wife are forbidden to each other is on Yom Kippur and Tisha Bav. There are other times which based on kabbalistic sources it is recommended to refrain from being together, These days are: the first night of Pesach, Shavuos, Shmini Atzeres, and the 2 nights of Rosh Hashana.
However being that this is not a halacha from the Talmud and Shulchan Aruch, rather a kabbalistic consideration, there are various exceptions: If the night of the wife’s immersion after the seven clean days falls on one of these nights they should not refrain. According to some opinions, if one has not yet fulfilled Pirya Varivya [had a boy and girl] he should not refrain [presumably if it is possible for her to become pregnant on that night].
In addition, one who has any possibility that refraining will cause him improper thoughts or other issues, it is a mitzvah for them not to refrain.
When a wife or husband is observing the 7 days of mourning for a close relative they are prohibited from marital relations.
Shulchan Aruch O:C 240:1, Mishna Brura s”k 7 and Biur Halacha ibid.