The Supreme Court yesterday broadened the authority of federal judges to punish juvenile offenders who later commit adult crimes.

By a 6-to-3 vote, the court said that an offender convicted of assaulting prison guards while in a special federal rehabilitative program for juveniles can be removed from that program by a judge and placed in an ordinary prison with adult convicts.

The case involves the federal Youth Corrections Act, designed to separate youthful federal offenders and give them special rehabilitative attention. The special treatment is mandatory for those sentenced under the act. The case dealt with the not-uncommon situation of someone serving a YCA sentence who is then charged as an adult with another crime and sentenced to a consecutive jail term as a result.

About 175 of the roughly 1,300 offenders in the program were in that situation as of 1981. The question before the court was whether such offenders could be removed immediately from the special juvenile category or whether their removal must be delayed until the YCA sentence has expired.

In 1974, John Carroll Robinson, then 17, was convicted in the District of Columbia of second-degree murder and sentenced, under the YCA, to a 10-year term. In 1975 and again in 1977, Robinson was convicted of seperate assaults on federal correction officers and sentenced to a total of 6 1/2 years to be served as an adult following expiration of the 10-year sentence.

Federal prison officials, following their own policy, immediately removed him from the lenient program. In 1978, Robinson won a federal court ruling holding that those officials had exceeded their authority by altering the mandatory YCA sentence.

Yesterday, Justice Thurgood Marshall, writing for the majority, agreed that prison officials had no authority under the act to do what they did. They may not alter sentences handed down by judges, he said.

But he said the law does not require that Robinson remain in the youth program after being convicted of the later crimes, and the judge sentencing for those later crimes does have the authority to remove the offender from the juvenile program.

Justice John Paul Stevens, joined by William J. Brennan and Sandra Day O'Connor, dissented, saying the ruling breaches the principal that a punishment may not be increased after it is imposed. It also is unfair to inmates who made deals with prosecutors to get into the YCA program, they said.