I don't think there can be a definite answer to this question: it all depends on how much tension there is on the slackline. And the slackline tension depends on a few factors, among which there are:
- the length of the line
- the width of the line
- how much the line is actually tensioned
- body weight of the people walking on the line
- what the people are doing on the line (just walking or acrobatic tricks/jumps)
- the type of the line
So there are quit a few factors in the calculations. The only general advice I have seen on the internet, is that trees should have at least 30cm in diameter. I guess this should be good enough in most cases, but from my personal experience I would argue that for simple walking on a short (<=15m) line, trees with a much smaller diameter could be used without harming them as well.
Regardless of the tree diameter, it is, however, a good idea to use tree protectors. It could be either specialized gear that comes with the slackline, or just a piece of fabric to put in between the line and the tree.
To check the actual line tension one could use a Tension calculator.