Are pedestrian walkways purely cosmetic, or do they help encourage walking instead of driving?

Pedestrians will use walkways instead of other methods. Presumable this depends on if the route is more convenient in some way and other factors, but built correctly they do help. For example, I've successfully connected the back of a dead-end residential area to the back of an adjacent industrial area and plenty of pedestrians would walk between the two zones. I also find connecting parallel roads via walkways wherever there's a bus stop on one seems to see decent usage.

I don't have the game available on this computer to show a screenshot, but if you look at this set of images (found via Reddit), which show a "Car free city", you can see that at the extreme a well designed walkway layout can drastically cut car usage.

Here's a great example image from that collection:

Pedestrians using raised walkway in Cities: Skylines