Published in Plos One, their study found empathetic people preferred more mellow, low-energy music.
While those who were "systemisers" - people who seek to analyse patterns in the world - enjoyed punk, heavy metal and more complex music overall.
Researchers say their work could have implications for the music industry.
Many people make snap decisions about the tunes they like or dislike, but scientists say what drives these preferences remains unclear.
To unpick this, researchers recruited 4,000 participants and put them through a series of different tests.
First, they were asked to complete self-reporting questionnaires with statements designed to assess whether they were "empathisers" or "systemisers" overall.
For example, people were asked whether they were interested in the design and construction of car engines and separately whether they were good at predicting how people were feeling.
Participants were then subjected to 50 short pieces of music spanning 26 different styles, and asked to give each a rating between one and 10.
People who scored highly on empathy were more likely to be drawn to R&B, soft rock and folk.
In contrast those who score more highly on systemising tended to like music by heavy metal bands and more complex, avant-garde jazz.
People who score highly on empathy might enjoy songs such as Hallelujah by Jeff Buckley and Come away with me by Norah Jones.
While people who identify as systemisers are encouraged to try Enter Sandman by Metallica.
And when researchers delved deeper, they found even within a given genre, there were differences in the intensity and style of music favoured by each group.
David Greenberg, a doctoral student at Cambridge University, suggests these findings could be employed by the music industry.
He said: "A lot of money is put into algorithms to choose what music you may want to listen to, for example on Spotify and Apple Music.
"By knowing an individual's thinking style, such services might in future be able to fine tune their music recommendations to an individual."
A person's taste in music may offer insight into the way in which they think, researchers at Cambridge University say.