Sure; that's what I do. But a solar panel that will fit on top of a car won't charge very fast. Mine gives about 200 watts best case, and so would take 80 hours of sunlight to completely recharge the car. (Which has an electric-only range of 40 miles.)What if you put them on the roof of a car? Will it work?
It generally makes a lot more sense to put the solar on (for example) a shade structure over a parking lot.