Nearly two years ago, three youths broke into a Silver Spring home, tore it apart, and caused about $1,200 in damage. They all were caught, but two of the teen-agers were released after their fathers agreed to pay their share of the damages.

The third youth was not so luckly. His mother, who lawyers say supported the family with two part-time jobs, refused to pay restitution, so her son ended up in court.

Yesterday, after a 19-month seesaw legal battle, Maryland's highest court ruled that the juvenile authorities' decision to proceed with the case against the third youth violated his constitutional rights. In a 4-to-2 decision, the Court of Appeals said that juvenile workers and prosecutors must not consider a parent's failure to pay restitution in determining how a case will be handled.

The ruling will affect far more than this one Montgomery County case, juvenile law experts said yesterday.

"I've seen it happen in my court room," said Prince George's County Circuit Judge Robert J. Woods. "One youth has paid off . . . and everybody's happy. He's out of it. But the rest have struck out. They don't have the money and they're in court."

Woods and other juvenile court judges hailed the decision, one of them saying that previously some "wealthier youths may have been able to buy ther way out of trouble."

Officials in the Department of Juvenile Services concede that restitution is one element they weigh when determining how they will handle a case. But they say the overriding question is whether a youth can benefit from court supervision and treatment.

In the Silver Spring case, a Montgomery County juvenile services official said yesterday the restitution question was not the "basic reason" the youth was sent to court.

"There was a need for treatment, care and rehabilitation in his case, but the other kids (involved) did not need rehabilitation," said Don Davis, who supervises the juvenile workers who make these decisions.

A worker can either dispose of the case at the level by talking to the youth and his parents or recommending counseling, or he can send the youth to court where the youth faces sanctions - including sentencing to a detetion center - if he is found involved in a crime.

That restitution even enters into this decision is "pretty disturbing," said Bruce Sherman, the lawyer who represented the Silver Spring youth at his juvenile court hearing in January 1978: "It means the rich could always have the chance to buy out of court."

Sherman, who represented the youth without a fee as a public defender, said the youth's mother, who was separated from her bushand, worked at two part-time clerical jobs.

"To pay restitution would literally have meant taking food off of the family's plate," said Sherman.

When Sherman brought up the issue at the January hearing, arguing that the youth's rights to equal protection were beging denied, Disrict Court Judge Douglas H. Moore Jr. Dismissed the case.

The state appealed to the Court of Special Appeals, and Moore was reversed. Then the public defender's office, representing the youth, appealed to the higher court.

Yesterday, in a majority opinion written by Judge Harry A. Cole, the court ruled that although state law gives juvenile workers and prosecutors "wide discretion" in determining how cases will be handled, "the discretion must be exercised within constitutional limits" and with "an even hand." In his case, the court found, it was not.

The decision should be based solely on the youth's need for "rehabilitative services," Cole wrote. The juvenile laws provide for judges to order restitution once the case is already in court, Cole pointed out.

In the dissent, Chief Judge Robert J. Murphy agreed that the decision to press a juvenile complaint "cannot turn" to the failure of a parent to pay resitution. But he disagreed that in this case the youth's rights had been "intentionally" violated. The court record showed that the youth also "had some emotional problems," so the decision to send him to court was also based on the youth's interests, Murphy wrote.

Prince George's County Assistant State's Attorney Elias Silverstein said the ruling will affect his decisions in perhaps 15 juvenile cases each month.