Ash from charcoal grills, where you've used charcoal briquettes with or without lighter fluid should not be used in your compost or garden. This ash should be put in a bag and disposed of with your trash.
If you heat your home with coal, you are creating coal ash. Coal ash should not be used on any plant crop that you plan to eat - do not place coal ash in your compost or your vegetable garden. This ash should be put in a bag and disposed of with your trash. Be aware that coals from ash can be 'live' and continue to burn for as long as 4 to 6 weeks after they've been removed from the stove.
Wood ash and ash from the fireplace (assuming you didn't burn treated or painted wood) can be used in your compost pile (very small amount), used in the winter to help gain traction against ice and snow, as an insect repellant (sprinkle small amounts around the perimeter of your garden to deter slugs and snails), spot remover on wood furniture (make a paste with water, rub over rings left by water glasses - follow up with furniture polish) or applied to your soil if you need to raise the pH. Treated or painted/stained wood should not be burned, as it emits toxins into the air and results in contaminated ash.
Spreading the ashes over your lawn and garden may or may not be the best means of disposal. Wood ash is somewhat beneficial to the soil because it contains essential plant nutrients. Depending on the type of wood, the ash may contain five to eight % potash, one % phosphate and trace amounts of micro-nutrients such as iron, manganese, boron, copper and zinc.
What about ash from manufactured logs and pellets? Usually manufactured logs and pellets are made from wood waste, sawdust and waxes. Make sure you know if the these products contain natural adhesives (natural waxes and oils) vs. petroleum based products. Ash from logs and pellets with petroleum based products or unknown ingredients should not be applied to your garden, soil or compost. If you're not sure, contact the manufacturer directly, or throw it out in the trash.