As many have said it depends on the crime and it depends on the quality of friend.
I would be a hypocrite if I ratted out my friends for illegal activity as I, and I'm sure a good number of you, have done enough time in the shady department.
It's just that I don't tend to associate with anyone stupid enough to get caught, or spineless enough to rat on people.
But for extreme cases..
Murder: Maybe if the victim deserved what was coming would I keep it under wraps. It's a big stretch but you can't deny that some people in this world are beyond help or persuasion. In most cases, I would turn them in.
Rape: I'd try to keep the incident self contained if they were a close friend, if only to attempt to resolve it internally. If they weren't a close friend, I'd probably give them a piece of my mind and maybe turn them in if they didn't do it themselves.
Robbery: Depends on the scale. If its breaking into a house and stealing someones hard-earned possessions, I'd probably turn them in. If it was something extreme like a Bank, I would be impressed that they would have the skill and ability to pull it off successfully. And considering that the companies who run the Banks have a ridiculous amount of money to begin with, the bank should be able to recoup the damages pretty easily. Almost a victimless crime.
Drugs: Dealing, no. Producing, no. Smuggling, maybe if children were involved. Mainly because those involved are at a high risk of being found out anyway, or killed. Serves no purpose to rat them out unless you really have it out for them.