Security in Tarifa, as in any other city in Spain, is at the top. But tourists are still advised not to use expensive things and not to show large bills in the areas of poor fishermen's huts. You should also avoid carrying large sums of cash and should keep an eye on your bag at all times.
You should not be afraid of catching a pickpocket red-handed. In town, tourists are usually supportive and helpful in dealing with a thief. Especially attentive should be at the local market, which attracts not only tourists, but also lovers of easy profit. In any case, if you find your belongings or money missing, contact the local police immediately.