"We absolutely must speak out against the notion that some people have that 'anything goes' on the Internet," Harper said during question period in the House of Commons.
"Something that is a crime is a crime if it happens on the Internet as well."
Harper's comments followed his meeting Tuesday with the parents of Rehtaeh Parsons, the 17-year-old Nova Scotia teenager who took her own life earlier this month.
Her family alleges Parsons was sexually assaulted by four boys in 2011 and that a digital photograph of the incident was shared around her school.
Parsons' parents want federal laws beefed up so more can be done to combat cybercrime.
"Our Criminal Code dates from another era," said NDP Leader Tom Mulcair, whose question in the Commons prompted Harper's remarks.
"There are realities in today's society that it simply does not address. We are committed to working with the government to make changes to the Criminal Code to deal with cases like Rehtaeh's before the House rises for the summer."
Justice Minister Rob Nicholson, meanwhile, pushed his provincial and territorial counterparts Wednesday to speed up efforts to create a law that would curb cyberbullying. Those ministers gave him the go-ahead, Nicholson said after the meeting.
"Today, when I met with my counterparts, I recommended that we expedite the review of our laws by June and I was pleased to receive unanimous support," Nicholson said in an emailed statement.
"I look forward to receiving this report."
Nicholson said he also spoke with his colleagues about a proposed federal bill of rights for victims of crime.
While it wasn't clear Wednesday when an anti-cyberbullying bill might be introduced, Harper told the Commons his government plans give law enforcement the tools need to combat cybercrime.
"One of the difficulties here is that investigative tools for our police officers have not kept pace with the Internet age," he said.
"That must change."
Harper's wife Laureen has also been speaking out this week about cyberbullying, helping to promote a new website called needhelpnow.ca.
The website helps instruct teens and their parents on how to get a photo taken off the Internet.
Parson's parents, Glen Canning and Leah Parsons, met the prime minister for about 45 minutes on Tuesday. Canning later said the family felt "helpless" in trying for an entire year to get relief for Rehtaeh from her tormentors.
Nova Scotia Premier Darrell Dexter, who also met Harper, said he and the prime minister agreed that online harassment needs to be treated as a criminal offence.