If all cars were solar panelled, loads of the worlds pollution would cease to exist. It would also charge by itself if you park it outside. Fuel would not be needed for cars so there would be no use for combustion engines. This is the new energy we've been needing
Solar Panels are super expensive. Also super inefficient. Only about 22% of the energy solar panels take in can be converted into electricity. This will just cause low range on vehicles and it won't be affordable for most people to buy. Also what do you do if it's cloudy or if you're driving under trees.
There are some places around the world that do not get enough sunlight in the winter months which could lead to the solar panels not being filled enough to be used. Also this would cause the price of the cars to go up and a lot of people would not be able to afford that.