Yeast contribute to the flavor - sometimes hugely and sometimes barely at all. each strain has some set of ideal conditions, including temps (though i would also argue that their ideal temp varies based on other conditions, so they will behave differently in differ t breweries even at the same temp). Deviations away from those ideal conditions cause stress on the yeast and they start to produce compounds that impart off-flavors in the beer.
For temperatures at the homebrew level, IN GENERAL, English/American/German ale strains do well in the low-mid 60s F, lager strains do well in the low-mid 50s F, and Belgian ale strains are often used into the 70s and sometimes even 80s to push the various phenolic compounds over the top.