Ah! I thought it was harmful to them. Thanks
The original, common variety of trolls would turn to stone in direct sunlight. This happened in The Hobbit, as a matter of fact (Bert, Tom and Bill were their names, IIRC). Later evolutions of the troll, bred by Sauron (the olog-hai or something like that) were larger, stronger, smarter, and could withstand sunlight, though they hated. Similarly, the common orcs (snaga) were much weaker in direct sunlight, whereas the more evolved orcs (again after more tinkering and breeding by Sauron), the uruk-hai, could run and fight even in direct sunlight, though they hated it.