ROME—A ruling by Italy's constitutional court this week knocked down an electoral law widely blamed for the recent instability of Italian governments, but it could undermine future ruling coalitions even more if Rome fails to pass new legislation.

The court declared the 2005 law illegal on Wednesday, saying that it failed to give Italians a basic right to express a preference on who would represent them. More specifically, the ruling knocked down a mechanism that gave 55% of seats to whichever coalition won the most votes,...