The role of solenoid's wire diameter?
Flux density in a solenoid is proportional to the number of turns and current.



As you can see, wire size and/or resistance is not in the equation, the size of the wire only indirectly affects the result. Too large and you can't fit the turns into the space. Too small and the wire will overheat, or the resistance is so large that you need a higher voltage than desired to get the same current.

Also, since most people want to drive the solenoid with a constant voltage, you want the desired current to result from the rated voltage.