Are sanctions an effective tool of statecraft?

Are sanctions an effective tool of statecraft? If so, how should they be used? If not, why?