When you enable sandboxed code in your farm, this option is available for all site collections. There is no simple switch to disable sandbox solutions for a web application or a site collection. But it is possible to “disable” sandboxed code for site collection with quota settings.

When you set the Limit maximum usage per day to the value of 0, a site collection admin is not able to activate any uploaded sandbox solution.