In Legends: Z-A, donuts have 4 main properties: star rating, level boost, donut energy, and flavor.
Star Rating
A donut's flavor score (the total flavor points of all the berries used) determines its star rating, which is an approximate overall ranking of how good it is.
Underpowered donuts whose star rating is lower than the distortion's star rating incur a penalty to the catch rate. This is 0.9x if your donut is 1 star lower and 0.3x if your donut is 2 or more stars lower.
Additionally, your donut's star rating relative to the distortion's star rating determines how fast your calorie meter will deplete, so using an underpowered donut restricts the duration of your visit.
Level Boost
The donut will add the specified number of extra levels to the actual level of all Pokemon in your party while in Hyperspace Lumiose. This temporary effect boosts the overall strength of your Pokemon and helps them stand up to wild Hyperspace Pokemon, whose levels commonly exceed the normal lv. 100 cap. Each berry adds a set number of levels when used as an ingredient.
Donut Energy
The number of calories provided by the donut determines the length of time Hoopa is able to keep you in Hyperspace. The speed at which calories are depleted depends on the donut and the distortion's star ratings. Once your calories run out, you are instantly ejected from the area. Each berry adds a set number of calories.
Flavor
A donut's flavor determines which Flavor Powers may be in effect. These effects are randomly selected, so the same combination of berries can produce different donuts, but having a higher flavor score increases your odds of getting better powers. Each Flavor Power can be Level 1, 2, or 3, corresponding to more intense boosts. They may only correspond to a particular type, with "All Types" also being a possibility.
Sweet
Influences the appearance of wild Pokemon encountered.
- Teeny Power: Increases the rate of smaller-sized Pokémon.
- Humungo Power: Increases the rate of larger-sized Pokémon.
- Alpha Power: Increases the rate of Alpha Pokemon (unboosted rate = 1%).
- Lv. 1 - 11%
- Lv. 2 - 21%
- Lv. 3 - 51%
- Sparkling Power: Increases the rate of shiny Pokemon.
- Lv. 1 - Adds 1 extra shiny roll.
- Lv. 2 - Adds 2 extra shiny rolls.
- Lv. 3 - Adds 3 extra shiny rolls, and if one exists near the entry point, causes the first Pokémon matching the Sparkling Power type to be spawned as a shiny.
Fresh
Helps with catching wild Pokemon.
- Encounter Power: Listed in-game as causing you to see "more wild Pokemon than usual". Actually reduces the time it takes for captured/defeated Pokémon to respawn, and does not affect hoard sizes.
- Lv. 1 - 70% of normal respawn time
- Lv. 2 - 50% of normal respawn time
- Lv. 3 - 30% of normal respawn time
- Capture Power: Boosts the catch rate of wild Pokemon.
- Lv. 1 - 10% boost
- Lv. 2 - 20% boost
- Lv. 3 - 30% boost
Sour
Offers boosts to items and Mega Evolution.
- Big Haul: Increases the drops obtained from Poke Balls.
- Item Drop: Increases the rate of a particular category of item.
- Mega Power Charging: Increases the rate your Mega Meter fills up.
- Mega Power Conservation: Reduces the rate your Mega Meter is depleted during Mega Evolution.
Spicy
Boosts offensive stats.
- Move Power: Increases the power of your Pokemon's moves of a particular type.
- Attack Power: Boosts Attack.
- Sp. Atk Power: Boosts Special Attack.
- Speed Power: Boosts Speed.
Bitter
Boosts defensive stats.
- Resistance Power: Reduces the power of opponents' moves of a particular type.
- Defence Power: Increases Defence.
- Sp. Def Power: Increases Special Defence.
What if I don't like the donut I just made?
Normally, the game autosaves after a donut is created, so you cannot revert to a previous save to undo an unwanted donut. However, if you are unhappy with the donut that was generated, you can recover your berries by reverting to your backup save.
While on the title screen, pressing ▲, B, and X simultaneously will allow you to access a save that restores you to your progress from the most recent time you fast traveled, but spawning in at the location of the last Pokémon Center you visited. This is a failsafe for releasing players who saved after getting stuck somewhere they weren't able to escape from, which was an issue in some older games. If you warped to Hotel Z just before creating your regretful donut, you won't lose any progress and you'll get the ingredients back.
Sources
Aside from my own experience and in-game tool tips, credit to dataminer Anubis for info on specific parameters and YouTuber Papa Jefé for info on Encounter Power and backup saves.