Almost anyone with knowledge relevant to a particular case can be asked to testify in court about what he or she knows, although exceptions exist for individuals who are too young or who have a documented mental disability. If you receive a subpoena but disobey it, or if you refuse to answer a question while on the stand, you may be charged with contempt of court. When he was in his teens, my son pleaded guilty to a charge of possessing a small amount of marijuana. Quite possibly, yes.
Most states have laws that allow offenses by young wrongdoers to be erased from their records.
Work with an experienced lawyer in your state.