DO take a subpoena seriously. It has the force of a court order. That doesn't mean, by the way, that a judge has actually taken an interest in you (they are usually prepared by an attorney for a party) but a judge will be annoyed if you ignore a subpoena.
DO be honest and forthcoming with your testimony. That doesn't mean spill your guts out, but answer questions fairly and with intellectual honesty. You saw how badly a recent President looked when he tried to get cute with his testimony. Of course, also remember that perjury is a felony.
DO be honest and forthcoming with your attorney. Even if it is embarrassing, even if it makes you look like an idiot or a crook, it is better if your attorney knows. Giving your attorney insufficient information is like hiring a chauffeur and not telling him or her that your brakes don't work.
DO make yourself available to your attorney for discussions regarding the case, including working on discovery and preparation for depositions and trial. It is not a waste of your time if it helps you to win the lawsuit.
DO follow your attorney's advice about how to behave in the deposition or the courtroom. Don't be afraid to ask him or her if something is appropriate. It's one of the things that you are paying your lawyer for. Your attorney will tell you what he or she wants from you if you are deposed or have to take the stand in a trial.
DO dress as well as you comfortably can. A suit is best, for a man or a woman, but if your head spins and you gag at the thought of a tie or a skirt, dress as nicely as you can. If you are a police officer, military personnel, or cleric, your uniform is always appropriate. Your credibility as a witness is in some small degree judged by your clothing.
DO give your attorney everything in your relevant files, even if it is embarrassing or incriminating. If you have the document, the odds are that someone else does too.
DON'T ever guess. You are in a deposition or on the stand to give facts, not to try to figure out what might have happened. Even if it makes you feel stupid to say it, sometimes "I don't know" is the right answer.
DON'T help. It is human nature to want to explain things so that your listener understands. Resist the impulse. It is your opponent's job to get the answers. It is your job to answer only the question asked, and not help.
DON'T try to be funny, unless you are actually Dave Barry. There are several reasons for not even trying. First, and most obviously, not everyone has the same sense of humor; some people, and there are judges in this category, have no humor at all. Second, your words are taken down by a court reporter to be read later. The court reporter does not take down facial expressions, gestures, or tones of voice. You can be saying "yes" in a sarcastic whiny voice while making quote marks with your fingers, and what will appear on the page is "Yes."
DON'T get distracted. Pay strict and guarded attention to the questions being asked. If your attention wanders, you could make mistakes or misunderstand.
DON'T answer a question you don't understand. If a question is vague or compound ("Did you go to the store and who did you see and what did you say to them?") or assumes something that isn't true, you have the right to have the question restated or rephrased.
DON'T be afraid to ask for a break during a deposition. They can take hours, and it is inhuman to expect you to sit and squirm if you need a restroom break. BUT-
DON'T even think of asking for a break while you are at trial. Breaks are entirely in the control of the judge, and asking for a break (unless something dreadful happens, like you start crying) looks very bad.
DON'T take any drugs or alcohol before you testify. This may seem obvious, but you'd be surprised. Remember that "drugs" also includes things like cold medicine, or even more caffeine than you are used to. You should also be careful what you eat before you testify. That isn't the morning to skip breakfast if you usually have it.