A modest amount of ash can be good for most gardens and lawns, especially in traditional wood-burning areas, because of what the cumulative effects of acid rain have done over the years, in general, to decrease average soil pH.
However, because ash raises pH, you want to avoid spreading it around plants that do better in more acidic soils. For example, a friend wondered why his blueberry crop went to zilch the season after he dumped almost all of his winter's ashes near the blueberry patch. :bang:
Ash is extremely water soluble, so it'll do its pH-raising work much faster than traditional limestone. That means you need to be using it as a fertilizer/soil enhancer in moderation -- too much and you'll have really basic soil.
Same goes for adding ash to compost -- composting is more acidic than basic; too much ash could actually shut down the composting process. Plus, composting is slow enough this time of year for anyone in Hardiness Zone 7 or lower without adding in more slowdown from adding ash. I don't start adding ash to my compost bin until mid-March at the earliest, and even then just give it the one ash can in the Spring and one in early Fall.
All that said, the best decision starts with being well-informed. So if you're looking to use ash to do something with soil pH in an area of the landscape that matters to you, do a soil test first so you have some data that can help you determine how much ash to be using in this way.
In my flower gardens, peonies absolutely love the ash -- peony flowers get bigger and more prolific each year now that I've been giving them a shovel of wood ash every winter.