Yes, in California, you do have to wear a helmet while riding a motorized scooter.
According to California law, riders of motorized scooters must wear a properly fitted bicycle helmet that meets regulated safety standards. This law is mainly applicable to open motorized scooters. For fully enclosed mobility scooters, like the Q Runner, which are more like a car, helmet use may not be required.