On-street parking is available, and safe, in both Glasgow and Edinburgh; however it’s expensive¹ in and near the city centres (including on Sundays in some areas), it’s often very hard to find a spot anywhere near the “touristy” areas, and many spaces are time-limited so you wouldn’t be able to leave your car in a single spot anyway. Ground and multi-storey car parks are also available in both cities, often with the option to book a spot in advance, but they also tend to be very expensive. On top of all that, driving to Edinburgh and Glasgow city centres is often painful — roadworks are common, as are traffic jams, and there are many traps for the unwary (e.g. bus “gates” in Glasgow city centre).
An interesting alternative is park and ride in both cases.
Edinburgh has seven park and ride car parks all around the city, five of which connect to bus or tram services, the other two connecting to train or coach services. They all have ticketing facilities so you can buy tickets before boarding without needing the exact fare (as you would on a bus). Bus and tram day tickets are reasonably priced and will allow you to use public transport to move around the town; if you park at the Ingliston park and ride you can also take the tram into town (don’t worry about the zones, the standard day ticket is valid all the way to the park and ride; it’s only the last leg to the airport which requires a special ticket). It can take quite a while to ride the bus into town, but on a weekday it will usually be less than it would take you in your car. The buses in from park and rides are mostly standard bus services, and you can get off at any bus stop (except on express services) — depending on which park and ride you start from, this can provide easy access to the zoo, Fountainbridge, the Royal Mile, the West End, the East End etc. Do make sure you know in advance which buses you can get to go back to the car park, and when they run. I’ve never used the Newcraighall park and ride, mentioned by vclaw, but it does seem like an interesting option if you’re coming from the East, with a ten-minute train ride into Waverley Station.
Glasgow has three park and ride car parks connecting to the subway, many more connecting to trains (look for “Scotrail locations” on the park-and-ride page); you can also try your luck with on-street parking near a subway station. Some touristy areas have free on-street parking nearby, for example Kelvinside immediately to the north-west of the botanic gardens. In the subway park and ride system, you pay a fixed price for all-day parking and a return ticket to the town centre. Since it’s a subway, on a small loop, it doesn’t take long to get anywhere close to a subway station; note however that buses operate a different ticketing system so combining the subway and buses can quickly get expensive. The trains around Glasgow are affordable (certainly by UK train standards), quite frequent and take you right into the city centre.
¹ 2023 street parking rates are up to £6.70 per hour in Edinburgh, and up to £5.60 per hour in Glasgow.