Essentially, refineries give a small bonus to resource extraction in the planet you build it in and adjacent planets. If you mouse over a resource asteroid, it will show a "Refinery Quota: x/3," (x/4 for neutrals) x being the number of refineries you have in the asteroid's system and adjacent planets.
If you really want to, you can give yourself a headache trying to figure out the optimal arrangement, but one per planet generally works out fairly well.