Do the curtains have to be closed?
The simple answer is no. The choice is yours.
The main reason for closing the curtains is that it mirrors the lowering of the coffin into the grave at a burial, and so is a visual reminder of parting. Some people think that although it is a hard moment it helps in the necessary process of saying goodbye.
However, some families choose to leave the curtains open, and then, as they are leaving, to touch the coffin and say a final private word of farewell. My experience is that this works well, too.
As you make your choice, I suggest that you take your time to think about the physical way that you want to make this goodbye which will be shared by your family and friends. If you have chosen, it will be the best way.