The first part of this answer, up to the horizontal line, is looking from the server's point of view, a.k.a. the service's point of view.
When you provide a service on 0.0.0.0
that means it binds to all interfaces - so if your computer has 2 wired Ethernet cards and one wifi interface, the service will be accessible to any client/device on any of those networks.
When you provide a service on 127.0.0.1
it will only be available to clients running within the same machine it is running on.
In essence, 0.0.0.0
means "anywhere and everywhere", while 127.0.0.1
means "precisely here and nowhere else".
Let's look now from the point of view of a client which is trying to connect to a service.
If the client tries to connect to 127.0.0.1
, it means it is looking for a server running on the same machine as itself.
If the client tries to connect to 0.0.0.0
that isn't specific enough to be successful - do you mean a lovely, quality-assured service in your main office, or some grubby, malware server in a far-flung, law-less country?