The relevant bit of the original license terms is as follows:
"General Product License. This copy of Baldur's Gate: Tales of the Sword Coast (the Software) is intended solely for
your personal noncommercial home entertainment use. You may not decompile, reverse engineer, or disassemble the
Software, except as permitted by law. Interplay Productions and Bioware Corp. retain all right, title and interest
in the Software including all intellectual property rights embodied therein and derivatives thereof. The Software, including, without limitation, all code, data structures, characters, images, sounds, text, screens, game play, derivative works and all other elements of the Software may not be copied, resold, rented, leased, distributed (electronically or otherwise), used on pay-per-play, coin-op or other for-charge basis, or for any commercial purpose. Any permissions granted herein are provided on a temporary basis and can be withdrawn by Interplay Productions at any time. All rights not expressly granted are reserved."
Modding would clearly be illegal if done for a commercial purpose. For non-commercial purposes it will be affected by the general laws of a country about what is 'fair use'. I suspect that in most countries it would be counted as illegal if really put to the test in court, but no-one really has an interest in doing that to prevent non-commercial use of such an old product.
In the case of BGEE Beamdog have actively been encouraging modding and therefore are implicitly giving permission for this to take place.