Seeing how probably 90% of fish we kept, esp. larger fish, arrive in your tank from the wild, no, direct sunlight is fine for them.
But as Shrimpy mentioned, any tank I've had setup that was exposed to direct sunlight, seemed to have some algae problems, or at least I had to scrape the glass more then I cared for.
And I don't mean this to be insulting in anyway, I'm just curious as to how you figured it could be potentially harmful?