Being on trial is a common dream event, although it sometimes gets acted out in uncommon ways. Our society is oriented towards problem-solving through litigation. The result is that lawsuits have become the new lottery of our era.
Being tried for your actions in dreams can be a non-sense sort of dream insofar as you may be tried for something against which there are no laws. In addition, the roles of the court characters may be filled by friends, co-workers, a spouse, siblings or other family members. In dreams of this case, you may fear that your life is being over-scrutinized in waking. There may be secrets that you are keeping deep within the subconscious that need to be processed.
If you are in one of the legal roles in your dream it is likely that you feel a need to protect yourself. This may be protection from the influences or dishonest conduct of others, or a general feeling that people are not leveling with you. If you are defending another, it may be that you feel life is taking advantage of you at some level. Your defendant will be a clue as to how this is occurring.
Where is the trial taking place -- is it in a normal courtroom, or perhaps in your office or home?
Do you get the sense that you have been wrongly accused of something?
Do you feel that you will certainly be found guilty of something you know you did?