We present a unified framework for studying Coulomb interactions in arbitrary environments using macroscopic quantum electrodynamics on the basis of the electromagnetic Green's function. Our theory can be used to derive the Coulomb potential of a single charged particle as well as that between two charges in the presence of media, bodies and interfaces of arbitrary shapes. To demonstrate this, we reproduce the well-known screened Coulomb force, account for local-field effects and consider new cases such as a dielectric cavity and a conducting plate with a hole.