All elements of a game influence my opinion. Soundtrack/music is definitely one of the top ones for me.
Obviously, I am not going to HATE a game if it is great in every department aside from music, but music is extremely important.
Think of it this way, when a game has memorable music it does two things. Not only does it sound great and you love hearing the catchy/likable music, but it will dig up memories of the game it is attached to and will tumbleweed from there.
If a game has a great soundtrack, you will associate it with playing the game and recall memories of great moments during the music (because that is how some memories work; They attach to audio cues) and then you think about other music in the game and other great moments.
If a soundtrack is not memorable, you can actually have a harder time remembering what seemed like memorable moments because you can't use an audio cue (and would instead need a visual cue, like replaying the game or watching a video).
Good music can also lead to lamenting about how a game was awful, but had great music.@siavm
This is also true. Regardless of how memorable music may be (unless it is awful and loud), it will eventually get drowned out by the experience and you won't even notice it at some point (unless like the last sentence OR if it is redundant, since that will get annoying).
However, later on, even though you don't remember the music so much (like, if you think of the game, the music won't come to mind), the music will remind you of the game.