It differs from language to language but in general, it is attributed to the case forms becoming too similar to maintain the distinction due to various sound changes.
E.g. in Old French, this is typically explained as a result of the Germanic invasion in Gallia. The Germanic languages of the day are estimated to have had a dynamic accentuation, meaning that accented syllables were pronounced "stronger", while the unaccented ones were somewhat reduced (the result of this is well visible in today's English where most unaccented vowels merge into schwa).
It is estimated that Old French developped a similar feature under the influence of Frankish and given the way Latin accentuation (accent typically on the penultimate or antepenultimate syllable) and Latin declension (cases are expressed by endings, mostly monosyllabic ones) work, the loss of declension seems like a fairly natural result - post-accentual vowels were reduced/lost and with them most of the endings. The noun forms became too similar and the number of cases dropped to two: subject case (orig. nominative) and oblique case (orig. accusative) and they were distinguished mostly in masculine (the evolution pathways are tentative, I do not have immediate access to sources):
nom.sg. mur-s ( < mur-ə-s < mur-o-s < mur-u-s), nom.pl. mur ( < mur-ə < mur-e < mur-i)
acc.sg. mur ( < mur-ə < mur-o < mur-u < mur-u-m), acc.pl. mur-s (< mur-ə-s < mur-o-s)
With the loss of final -s, the case syncretism would be complete in nouns.
Other Romance languages had different reasons and slightly different results but to my knowledge, they are not as well explained, but similar reason would apply - case syncretism due to phonological change, even though the sound change is different in its nature.