In the case of a criminal investigation, how does one knows which exchange or wallet service a bitcoin address belongs to?
There is no guaranteed way to check.

In most investigations, it is a combination of tracing the money to known addresses (most exchanges and companies consolidate funds into a handful of hot and cold wallets), and exchanges volunteering/sharing information when served with warrants.