A state agency providing care for children is so mismanaged it allowed a new state hospital for mentally retarded to remain unused at least nine months, a state legislator charged today.

In addition, Del. Frank M. Slayton (D-Halifax), accused a second state agency of allowing a 15-year-old mentally disturbed child to be kept in solitary confinement at a state prison after being shuttled between 17 different foster homes. The child was in the custody of the welfare department and had committed no crime, he said.

Slayton also told the Senate Rules Committee that a Louisa County man was indicted this month on charges of committing sodomy on eight boys under his care in a state-licensed foster home.

Slayton, chairman of a subcommittee investigating child care, accused the state's Departments of Welfare, Corrections and Mental Health and Mental Retardation of mismanagement. He said the agencies had tried to conceal information about alleged mismanagement and mislead his committee about care given foster children and entally ill.

Officials of the three departments, reached after Slayton's testimony yesterday, denied concealing information and mismanagement.

The legislator charged in his testimony that the new $2 million mental hospital in Danville had been unsued for nearly two years. A spokesman for the state Department of Mental Health and Mental Retardation, however, said the hospital had been unused for only nine months. The spokesman said the hospital will begin receiving patients on March 15.

The spokesman blamed money and staff problems for delay in opening the facility, which would serve South-side Virginia.

Slayton didn't accuse the departments of attempting to conceal the three specific examples he cited today, but said the agencies had frustrated his subcommittee's efforts to learn about such instances by making it difficult for the committee to obtain records about operations and problems.

Slayton told the committee that problems among the agencies have "reached unreal proportions" and urged passage of three resolutions calling for reater cooperation among them.

The resolutions, previously approved by the full House, won unanimous approval and were sent to the Senate floor with the blessing of the Senate's senior member. "All I can say is 'good luck,'" said Sen. Edward E. Willey, (D-Richmond). Prisons and mental health officials have been quarreling for years over which agency should have responsibility for caring for distrubed children, he said.

Officials of the three departments said Slayton's committee already had forced major changes in the way the state handles children. "We have had what we call some pretty severe 'service gaps,'" said Carolynne Stevens, assistant director of youth services for the corrections department.

Another member of the Slayton subcommittee, Del. Mary A. Marshall (D-Arlington), agreed in an interview that state agencies were reluctant to give information to the committee. "Of course the agencies don't want to tell you bad stories about their operations, but we knew that from what happens in Washington," she said.

The major problem the agencies face, she said, is a lack of money. "When you are talking about better care for children, you're talking about money . . . and until we appropriate more money, there will continue to be problems," she said.

But Slayton in his committee appearance and in a later interview said money alone was not the major problem. The department of mental health should have enough staff to run the new hospital in Danville, in Southside Virginia, because of a sharply deelining population at the state's major hospitals for the mentally ill, Slayton said.

Slayton said he was so enraged over lack of cooperation between the various agencies that he took the problem to Gov. Mills E. Godwin in September. It was not until a second meeting in December that agencies began moving toward solving the problem of child care, he said.