Is It Legal To Mine Bitcoins?

First a disclaimer.  This is not legal advice.  For legal advice, contact your attorney.

The output of mining is blocks of data that essentially are batches of transaction entries that are notarized by the software the miner runs.  There likely isn’t a single jurisdiction on the globe where preparing that block of data would not be legal.

The reason miners participate is because from the production of that block of transaction data the miner obtains an additional few bytes of data that others would like to have and are willing to pay money to obtain.  This data likely violates no copyright laws, privacy laws or any other laws that generally address what can or cannot be done with data.

Your question might boil down to this – Is trading that newly created data with others in exchange for money legal?  

There have not been, to-date, any reports of any warnings given or any criminal charges made against any miners.

There could be some jurisdictions that might deem the exchange of that data (signed bitcoin transactions) to be a currency transfer and thus restrictions could exist involving reporting requirements, for example.

There has not been, to-date, any reports of any regulations or restrictions that address either Bitcoin by name or the concept of a decentralized digital currency whatsoever.

If a miner is particularly concerned, perhaps holding onto the mined coins rather than trading them would be prudent.