Not automatically. On-site generation is one of the inputs an EPC assessment recognises, so solar can lift the modelled rating, but the amount depends on the building's starting point, its energy use and the size of the array. A large array on an energy-intensive site can have a meaningful effect, while a small system on an efficient building may move the number very little.
The reliable way to know is to have the accredited EPC assessor model the proposed system against the building's full inputs. We can tell you the generation a roof can support; the assessor confirms the band.