Because if we use without insulation wires than, as we know curret has choosen always shortest path and in solenoid we want a circular path , to provide electromagnet, our coil will not magnetise fully and we will not get strong magnet.
When current flows through any conductor, magnetic field is formed.
When we make coil,current has circular shape to flow. So we have more magnetic field there.
If we use bare wire then obviously current won't flow in circular path. That's why we use insulated wire.
a solenoid is a cylindrical coil of wire acting as a magnet when carrying electric current.