Court dates are often set by the clerk without consideration for individual schedules, which means that your court matter may be scheduled when you have something else planned. Changing a trial date or other hearing date is left to the sound discretion of the court. Obviously, you don't want to seek a change of court date for unimportant reasons, such as keeping a haircut appointment, but if it's open-heart surgery, go ahead and request a postponement.
The Rule of Reason
If you come up with a list of 20 potential reasons to postpone a court date and run them by 10 of your best friends to vote yay or nay, the odds are that most will agree on what is reasonable and what is not. Moving a court date because you are scheduled to be on your honeymoon? That's a yes. Getting a continuance so you can see the opening of a Star Wars movie? Probably a no, to all but truly rabid Star Wars fans.
So apply the rule of reason yourself. Imagine yourself rising in the courtroom to ask the judge for a continuance. "Your honor, I would ask this court to delay the trial by three weeks because..." and then add in the reason. If you feel foolish, the justification probably won't fly. If it sounds reasonable, it's probably okay.
Matters of Trial Preparation
If the reason you wish to delay a trial is related to the trial, the court is likely to view it as justified. For example, if your eye witness won't be back in the country until July and your court date is June, a request for a delay sounds very reasonable. Likewise, if the other side just turned over evidence to you that requires you to hire and consult with a new expert, the postponement is in the interests of justice and might be readily granted.
The caveat here is that you must not seek the delay because you haven't been diligent. A court may look favorably on a request for a three-week delay so that you can review evidence if you just got the evidence from the other side. However, you are not likely to get the delay approved if you have had the evidence for six months.
Matters of Health
If you are seriously ill or a family member is seriously ill, a postponement request will likely be granted. The same is usually true if your attorney is ill. Again, the rule of reason applies. If you are going in to have a tumor removed from your stomach, or your spouse is having surgery for a bleeding ulcer, it is perfectly reasonable to ask for a continuance, and the other party may even agree voluntarily. If your surgery is elective (e.g. a tummy tuck) or the family member's life is not in danger (your adult son broke his arm), you can expect less accommodation.
Other Matters of Importance
Other matters of importance can justify a postponement, especially if they were scheduled before the court date was set. If you decided to get married, purchased tickets for an overseas vacation, or signed up to take the state bar exam before you knew the court date, your motion to postpone the trial will likely be granted.
Give the Court Enough Time
The best way to get a new date for a court hearing is to ask for it as soon as possible. The further away the current date is, the more likely it is that the court will make room for you. If you ask the court two days before the hearing for a new date and it wasn't an emergency, you might have a problem. If you receive a notice of hearing six months in advance and you know you won't be available that day contact the court right away, and you'll probably get the date moved.
The rule of reason applies to postponing a court date. If the justification is reasonable, related to trial preparation, your health or that of a family member, or a matter of some importance scheduled before the court date was set, the judge will likely have no problem with a request for postponement.