I tried to visit a legitimate website while using TOR browser, and it couldn't load as the IP of the exit node was "banned due to illegal activities". Then I tried to use "new identity" (another exit node) and eveything worked well. However, I am slightly worried about having accidentally used this suspicious exit node, which was maybe used by other Tor users for some crimimal activities! What should I do?
If you were using the Tor Browser in the recommended way, then there's nothing to worry about; your real IP address won't have been exposed, and the site could only have seen the IP address of the exit node. The fact that the site blocked access means you didn't get as far as doing anything that might have made you traceable, like logging in with your personal details.
"banned due to illegal activities"
What is legal and not legal is dependent on various factors. What is legal in my country might not be legal in yours. By extension, what is legal in the country where the site is hosted might not be legal in your country. And so on.
In all likelihood, the term "illegal activities" is being used in the context of the site's rules, rather than the context of the general rule of law, but without knowing the context, we're really just speculating.
Note that far more internet traffic flows through the clearnet than the Tor network, and it's likely a much larger amount of "illegal activity" is actually through nodes (routers) on the internet that everyone uses, rather than just Tor users. However, if sites blacklisted these "normal" nodes, rather than just specific IP addresses, they'd lose far more traffic than they do by blocking Tor nodes (which appear as single IP addresses, but which actually translate to many more users).
In short: the internet is full of "illegal activity", it just makes more economic sense to more often block Tor exit nodes.
[Caveat: I haven't included any sources.]