Depends what you threaten them with.
If you threaten to expose the CEO of a company for corruption and fraud ... no, that's not against the law.
If you threaten to kill your girlfriend if she tells anyone you cheated on her ... yes, you can be prosecuted.