Why does the method of images work?
Which method ?
Method of image charges in electrostatics to calculate the distribution of the electric field of a charge in the vicinity of a conducting surface.
Have you read the relevant Wikipedia articles?
In short, if you can find a solution for the electric potential that satisfies your boundary conditions for the electric potential, and the charge density within the considered region, you've found the unique solution. This is due to the uniqueness theorem.
That fact allows you to cleverly pick an arrangement of charges outside your considered region that satisfies your electric potential boundary conditions (usually by taking advantage of/introducing symmetries) and know that you've found the only solution that exists for your configuration.
Separate names with a comma.