I have worked out that a company I am working for is using the same product key on all its computers. They are all Windows 7 Enterprise PCs. Is this legal for them to be doing this?
Windows 7 Enterprise is only available through the Volume Licensing (VL) channel. Unlike other editions which are available through OEM or retail channels, a single key can be used for multiple activations.
With Volume Licensing for products such as Windows 8.1, Windows Server 2012 R2, Windows Server 2012 R2 for Embedded Systems, Windows 7, Windows Server 2008 R2, Windows Vista, Windows Server 2008, Microsoft Office 2010, and Office 2013, you must use Volume Activation (VA). To activate these products with VA, you can use either a Multiple Activation Key (MAK) or Key Management Service (KMS).
A MAK is used for one-time activation with Microsoft's hosted activation services. Each MAK has a predetermined number of allowed activations; this number is based on Volume Licensing agreements and does not match the organization's exact license count.
Source: Understanding MAK Activation
Through KMS, organizations set up a local KMS host (or hosts) that connect once to Microsoft to activate the KMS host(s). Then the individual systems throughout the organization connect to the KMS host(s) and activate transparently.
With KMS, client computers connect to the local KMS host to activate the first time, then they reconnect periodically to keep the activation current. KMS is capable of activating an unlimited number of computers, so it can be used for a VL agreement of any size.
Generally speaking you can use the same key and it will work, but of course Microsoft won't like you for it. Strictly speaking if they ever decided to audit your product key it could be revoked, but of course I have never heard of any case in which this has occurred. You can get a rough idea from Microsoft forums on where they stand on the issue.
As pointed out in comments I preface this looking at your specific reference to Windows 7 Enterprise which is available only through Volume License Center and can use a single activation key to install multiple systems.