We'll cut to the chase: Bitcoin Mining is legal — so long as you reside in a nation where you're allowed to hold a Cryptocurrency balance (mostly). Fortunately, the list of prolific states where Bitcoin is illegal to own, let alone use, is relatively short.
Here's a look at all the countries where Bitcoin is illegal:
◘ Saudi Arabia
◘ The Republic of Macedonia
If you don't reside in one of those countries, you should have no issues Mining. Although, it's worth noting that laws change all the time and while we've done our best to accumulate the most accurate information, sources can be unreliable at times.
As such, we'd strongly recommend consulting your local citizens advice bureau before turning to Mining. Even if you're allowed to hold a Cryptocurrency balance, there could be some little-known-about law that prohibits activities like Trading and Mining.