Officer Richard Hastings, 38, of Concord, is accused of molesting a 15-year-old boy on several different occasions between June and August.
Deputy District Attorney Alison Chandler said Hastings was arrested in August after the boy was caught sneaking out of his own home to meet with the officer.
Defense attorney Eileen Burke said the pair had met on an online dating site and the boy had claimed he was of legal age.
Burke argued for Hastings' $910,000 bail to be lowered because he "is no more danger than anyone who signs up for an online dating service."
Chandler, however, said the boy was clearly underage and was stopped by police that night in August on suspicion of a curfew violation.
When police contacted Hastings, he allegedly said, "Don't worry, I'm a police officer," Chandler said.
"He was using his police status to get out of the trouble he was about to be in," she said.
Chandler said prosecutors did not immediately charge him after his Aug. 21 arrest because further investigation was needed, including into the contents of his electronic devices.
She said the FBI reviewed those contents and found child pornography involving an 8-year-old boy.
Chandler said Hastings told investigators that after he was involved in a police shooting a few years ago, he began "doing riskier things."
"He is reckless, he is cavalier," she told Judge Bruce Mills.
Burke, the defense attorney, told Mills that her client "has been completely cooperative" and has not had any problems since his August arrest.
The judge decided to reduce Hastings' bail to $100,000 and ordered him to return to court on March 7 to set a date for a preliminary hearing.
Hastings, a 13-year veteran of the San Francisco Police Department, was suspended without pay after his arrest.
Hastings is named in a federal civil rights lawsuit stemming from the 2011 death of Kenneth Harding, who police say accidentally shot himself during a shootout with Hastings and another officer after police tried to stop Harding for alleged fare evasion in San Francisco's Bayview District.
At the time of the shooting, Harding was on parole in Washington after serving time for pimping a 14-year-old girl.
Advocates for Harding have questioned the Police Department's version of events leading to his death, as well as whether it was necessary to use force against him.
Tracey Bell-Borden, a friend of Harding's mother, attended this morning's hearing and criticized Hastings.
"This is someone who was supposed to serve and protect," Bell-Borden said. "This man, something is wrong with him."