No, there is no law that prohibits visiting onion sites. However, accessing these sites is not always legal. For example, some onion sites may host illegal content such as child pornography. As a result, it is important to always be aware of the legality of any site before visiting.