Ohm's Law - Volts = Amps x Resistance or Amps = Volts divided by Resistance
Take a volt/ohm meter and measure the resistance in ohms of just the solenoid coil you want to activate. Use the nominal voltage of 12 used to activate the solenoid and divide it by the ohm reading you get.
That will give you the amperage for the solenoid.
Use one of the many online DC wire sizing charts or calculators for wire size and use the appropriate fuse for the wire size used.
Wire sizing calculator for Solar Panel Arrays