The train is the best public transportation option for getting to Caserta. It also drops you off right in front of the Reggia, only 400m away.
Trains depart Napoli Central about every half hour or so, and the journey takes about 40 minutes.
The nearest city to Caserta is Naples. There are frequent trains from Naples Central station to Caserta taking about 35 minutes. See the online Trenitalia timetable for more details (search for trains from Napoli to Caserta and back).