When people prepare a food like halwa and offer it to God before being distributed to other people as Prasad, is it alright to taste the food before being offered to God? How does one know the food being offered to God tastes good or not? Also interested to find out what the scriptures say about this.
It is Prohibited.
How does one know the food being offered to God tastes good or not
Quality Control cannot be done in current iteration. It has to be done in next cooking cycle - cook, offer to Bhagavan, partake prasad, if it tastes bad (too salty, no salt) then fix recipe amount accordingly in next cooking cycle (and remember it).
People might quote rare instances like Shabari offering fruits to Rama after tasting (this story's truth itself is up for debate), but in any case, we're not Shabari.
If you visit orthodox temple kitchens or gardens, the cooks & gardeners cover their nose/mouth to prevent even smelling the food / flowers before they're offered to Bhagavan.