Given that a ship is a torus embedded in the plane of a vast solar panel arrangement in a sun facing orbit around Mercury, is there any means by which to protect the ship's systems from coronal mass ejections and solar flares? The ship runs on solar panels spanning a radius of 2.3 km as there is very energy intensive processing occurring on base and shutting down systems for the duration of such events, especially due to coronal mass ejections which may happen every 2-3 days or max every week, is not feasible. Also even after shutting down systems a method by which to protect the solar panels is needed. Any method by which to 'earth' our ship or to deflect the incoming magnetic field lines and radiation is appreciated. Thanks!
PV electrical panels are a very poor choice for this environment, both for the reasons you have outlined, but also because the array of panels will act as a solar sail at this distance from the sun and provide unexpected torques to the spacecraft.
The settlement should be fine on its own, since it would have to be shielded by a minimum of 5 metres of water or slag to stop the cosmic radiation from frying the population. Since you are facing the Sun at a close distance, the mass could be increased to account for solar flares and other events. The mass of shielding would need to be threaded with heat pipes or other mechanisms to encourage the flow of heat from the "hot" side facing the sun, to the "cold" side facing space. This in of itself could supply a considerable amount of energy to the colony, essentially making the hull a huge thermocouple.
Another traditional means of generating electrical energy is to focus the sunlight on a "hot point" and use this to run an ordinary steam generator (almost any fluid will do for a Rankin cycle actually). Many of the iconic designs of spacecraft in the 1950's actually did have solar mirrors, generally used to boil mercury and the mercury vapour ran the turbines. (Don't worry, the astronauts were to be protected by a thick asbestos blanket....oh)
The prominent "trough" structure on top of the torus is the solar mirror for the mercury boiler
And if for some reason this wasn't enough, there is no reason the spacecraft needs to have its energy generated on board. A network of suitable solar power satellites farther away from the sun could simply beam energy to a lightweight rectenna on the "dark" side of the spacecraft, providing an independent energy source.
First off: think through a little bit of "naval architecture". If you know for a fact that the sun is going to be on one side (assuming a geosynchronous orbit) and not the other, put the solar panels between the ship and the sun. Similarly, if you have to carry water (which you do if you are going to carry people), put the water storage between the people and the sun (water is good radiation shielding).
As stated earlier, a faraday cage will have to exist around the entire ship structure, and probably electronic systems would have multiple redundant systems contained in separate, sealed and insulated compartments. In fact, they could even go old school and keep old fashioned analog navigation equipment on board as a backup just in case (sextant, slide rule, battery to light off rocket engines, and a lot of know how and you don't even need a computer).
Whatever the solar panels are made of, they have to be designed to handle solar flares, etc at close range if they are going to operate that close to the sun. The same features make them a nice shield for the rest of the ship. Finally, the ship would probably have very thick walls on the sunward side. In fact, since you know you will never want windows toward the sun and you want maximum shielding, and since you want to store water between the crew and the sun, you would probably do better to flip your torus so the rotating torus is edgewise to the sun BEHIND a wall of solar panels (which would require some kind of structural armature going from the center of the torus to the framework that holds the panels in place. That way, only one part of the torus is sunward at any moment, but it keeps rotating so no side gets "cooked" endlessly. Also, presumably, the floor of the torus is thicker than any other side anyway since you have to think about potential micrometeor impact.
The computer systems may be able to be protected by a Faraday cage built into the ship's hull. The solar panels would be harder to protect. Is there any specific reason for there to be solar panels on a spaceship that can reach Mercury? Presumably it would be powered by Nuclear Fusion. To protect the passengers, you'd have to make the outer hull out of quite thick pieces of lead to protect against the radiation, covered by equally thick pieces of tungsten to protect against the heat.
If you can protect your solar panels from melting, you could use water for radiation shield. Water is a very good radiation insulator and can be deployed around the settlement for this purpose.