In psychology, we call people's attitudes towards things "preferences", and the emotional experience associated with preference is referred to as "affect", or more specifically, "valence", which is positive or negative.
As alluded to in the question, there is a genetic predisposition for certain preferences, such as sugar (sweetness), and some aversions, such as quinine (bitterness). Biology sets probabilities, but since people can come to like bitterness and dislike sweetness, we know that as with any statistical probability, there can be some exceptions.
Learning also plays an important role. This was clearly demonstrated by the seminal Pavlov's Dog experiment. Dogs are genetically predispositioned to salivate when they smell food, but have no particular predisposition to the sound of a bell. However, by pairing the sound of a bell with the smell of food, dogs learned to salivate from the sound of a bell alone. This process of pairing something that does not elicit a response to something that does is called "classical conditioning".
A well known example of classical conditioning in humans is the sound of a pop-can opening followed by the sound of fizz, which is used by companies such as Coca-Cola in their advertising to elicit a conditioned (positive) response to television ads that only have sound and no smell or taste to them. Through classical conditioning, people can learn to enjoy something that they have no predisposition to enjoy or even something that they have a predisposition to avoid, or come to dislike something by a similar process. Restaurants often use ambiance, presentation, and other classically conditioned methods to improve the dining experience independently of the taste of the food.
The role of learning is also evident in cultural differences in common preferences. For example, different cultures show a general preference for spicy food, sour food, or subtle flavours. And as alluded to above, media (such as advertising) can have a profound influence at the cultural level as well - eg, robusta coffee is low grade and bitter, but Americans have been exposed to much advertising suggesting that it is of high quality, and it is very popular there. This can also happen through the mere-exposure effect.
Many other factors come into play, including cognitive biases and memory, and these combine together to influence individual preferences. For example, members of the same family may have similar genetic predispositions and similar cultural influences, but differences in the expression of specific genes, degrees of cultural assimilation, and personal experiences can account for their different preferences.