the noise startled the friend, who grabbed a gun and shot her, her father Praveen Lal said.
The incident happened on Friday night in Longmont, Colorado, north of Denver.
The teenager's death was "unintended and extremely tragic," police said in a statement.
"The closet opened and I think she jumped and screamed and he thought it was an intruder inside the closet, so he pulled the trigger," Praveen Lal said.
Premila was a track star and was honoured at a weekend cross country meet at her alma mater, KVDR TV reported. Her family described her as an athlete, popular girl and strong student.
Just before 8 pm (local time) Premila Lal showed up at a house her family once called home. They had since moved, and were preparing to sell the place.
In the meantime, Galley was staying at the house.
Premila Lal and her 12-year-old cousin apparently came to visit Galley. Lal's 15-year-old brother was also at the home, hanging out with Galley.
Praveen Lal, said in interviews with local media that his daughter entered the home without Galley's knowledge.
Authorities said that the father's description of what happened next, involving the closet, and Galley's gun, is consistent with their investigation.
"All the witnesses had consistent statements," Commander Jeffrey Satur of the Longmont Police Department told CNN.
A neighbour was quoted as saying that she saw the group rush out of the home, screaming. Lal was admitted to a hospital and was pronounced dead about an hour later.
"We lost a daughter, so we don't want anybody else to lose their son, you know, especially when it was accident," Praveen Lal told Denver TV station KCNC.
Galley has been charged with reckless endangerment, child abuse and providing a gun to a juvenile because Lal's 15-year-old brother had access to the gun, police said.
So far Galley has not been charged in Lal's killing. Police said they do not suspect the involvement of alcohol or drugs.