I would guess the first question here is: What are you trying to do?
It's safe to assume that if it's illegal to change the IMEI of most mobile devices, then it most likely applies to a bluestacks application as well. I don't see how it could necessarily harm anything though as long as you wouldn't be connecting via any GSM/CDMA network.