Can I use a 24V solar panel to charge a 12V battery?

Yes, you could do it. The voltage isn't too much of a concern, it is the current the panel can provide.

What is commonly known as a 12V panel is usually a 36-cell module with an open-circuit voltage of 22V, making maximum power at 18V. Traditionally so-called 24V panels would have double the cells (72 cells), and they'd make 36V-44V at the top end. Lately there is also a lot of 60-cell modules that make somewhere between 30V and 40V, which is also sometimes called "24V-panels". As you can see though, 12V panels aren't really 12V and 24V panels aren't really 24V. They are usually designed to put out at least 30% more than the batteries they are intended to charge.

This works perfectly well because a PV module is (at a constant light level) a constant current device. If you look on the back, you will see it has ratings for Isc (short circuit current) and Imax (maximum current). These two values are usually fairly close to one another. Now… hang on to your hats: This is the current at which it will charge regardless of what voltage you charge at. Remember that you are already doing this when you wire a "12V panel" to a 12V battery, because you are in fact pulling the 22V of the panel down to 12V.

It is not a very efficient thing to do of course. Let me explain. Let's say you have a 200W module with 72 cells. Vmp should be around 36V, and Imax should be around 200/36 = 5.5 ampere.

If you wire that module to a 12V battery, it is going to charge that battery at 8.3 ampere, and pull the voltage down to whatever the battery can handle. If the battery is pulled up to 14.7V for example, you will charge at 14.7*5.5 = 80.85watts.

Woah, where did the rest of the power go? It got lost because the module is constant current, and you're doing the work at too low a voltage.

This is where an MPPT comes in. An MPPT is essentially an auto-adjusting DC-to-DC converter that aims to run the PV module at the optimum power level (36V in our example), and then down-converting the voltage (swapping volts for amps like a transformer does), and then charging the 12V battery at the full 200W, or 200/14.7 = 13.6 ampere.

So getting back to the question: Can I connect a 24V solar module to a 12V battery? Sure… as long as the Imax specified on the back of the panel won't damage it, you can do that. But it would be terribly inefficient. The better option would be to use an MPPT-based charge controller.