I would expect either the plaintiff's attorney or the defense attorney to object to questions of you that are not deemed relevent or necessary. You should wait for the judge to rule on any objections before you respond. Also, if you do not understand a question, ask the attorney to repeat it or rephrase it before you respond. Finally, you don't have to answer immediately. If you are nervous, take a deep breath before you answer.
But, yes, you have to go and, you probably have to testify. You do have some a right to not answer questions that might implicate you in criminal activity. But, I would not think that such questions would arise in a divorce case.
You do not have the right to refuse to answer merely because the answer might be embarassing to you or to the plaintiff/defendent.
You are free to consult with a local attorney if you feel a need for more specific guidance, etc.