Smaller solar panels can be wired directly to batteries if that is what you want to do,
BUT,
That only works with small, low output solar panels.
If you have larger, higher output panels or several panels, you will have to use a charge controller to keep the batteries from being over charged.
Larger solar panels usually put out 24 or 48 volts, and way too much current for the average battery to absorb easily, and you will 'Cook' the batteries connected to them without a 'Charge Controller'.
There are three basic types of solar arrays,
1. Solar Panels, Battery Banks, and Inverters with Charge Controllers for the battery banks.
These systems are 'Stand Alone' and do not require connection to the common power grid.
This type of system usually takes LOTS of storage batteries and will be ineffective if you go several days without direct sunlight.
2. Solar Panels, Phasing Inverters so the power created by the solar panels can be used directly in the home as 110V power or sold back to the electric company via the grid hookup meter.
When you aren't using all the electricity created by your panels, it puts that power back on the 'Grid' and turns you meter backwards.
This is a 'Battery-Less' Grid Intertie system.
3. A combination of all three systems...
Solar panel array, batteries for short term supply, and a grid intertie so you can use power from the grid if the batteries get drained and you still don't have sunlight.
I run most of my home on 4 panels (under $2,000 total).
I'm running a battery-less grid intertie system, so when I'm not home or not using the current my array is making, it gets sold back to the 'Grid'.
That is called 'Net Metering'.
When the 220 volt cloths dryer is running, or the 220 volt central air conditioner is running, I have to buy power from the grid, but that cost is usually off set by the power I've already sold them, so I'm usually at the meter minimum every month.
I have two panels on the garage roof, older panels that don't work up to spec anymore.
I have an '83 Chevy S-10 that has been converted over to electric drive, and the solar panels on the garage roof keep it charged.
I pay ZERO for fuel the first 40 miles of driving most days.
Around town, running errands on days that aren't blazing hot or seriously freezing cold, it's a good vehicle to commute in. (Electric drive/not hybrid = No heat or air conditioning)