The little girl was hurt at home on a day when her mother had gone shopping and her father watched pornography in the living room, Mr Justice Holman had been told.
Family life was "chaotic", he said.
Details of the case were outlined on Friday in a ruling published by the judge following a private family court hearing in Leeds.
-> Man sentenced to life with minimum 15 years in prison for murder of Poppy Devey Waterhouse, 24, in LeedsCouncil social services bosses with responsibility for the girl's welfare had asked the judge to decide, on the balance of probabilities, how her injuries had been caused.
Mr Justice Holman said the family could not be identified and he has not named the council involved.
The judge was told the girl, now eight, said her brother, now 16, had "touched her" and "hurt her".
Mr Justice Holman analysed detailed evidence about the events of the day before concluding that the teenage boy had injured his sister.
The judge said there were a number of children in the family.
He said evidence showed that life at home had been "chaotic, unstructured, little disciplined and introverted".
"The children did not go out much, or socialise much with other children or families," said Mr Justice Holman in his ruling.
"For periods, all or some of the children did not attend schools.
"They appear to have spent inordinate amounts of time watching television, or films on computers, or playing computer games."
-> Why posters of this man who drowned in the River Aire are appearing around LeedsThe judge said the teenage boy claimed to have spent most of his time "closeted" in his room "either sleeping until very late or playing computer games" or "watching horror films with his father".
On the day the girl was hurt the children's mother had gone to a supermarket and their father had told how he watched pornography "on the couch in the living room", said the judge.
He said all the children in the family had now been taken from their parents and placed in council care.
The judge said the case had generated more than 9,000 pages of documents and the hearing had occupied 10 days of court time.