In 2012 the European Court of Justice (ECJ) ruled that gender is no longer allowed to be a factor when premiums are calculated for "everything from pensions to car and life insurance".
I assume this is based on discrimination law, of which gender is only one of a list of protected characteristics. This starts with age, but direct age discrimination is allowed with objective justification which seems easy in this case. Also on the list is "being married or in a civil partnership", which is a question that they ask when getting car insurance.
Is it legal for companies, such as car insurance firms and pension companies, to vary their prices according to marital or civil partnership status?
Note this is a question about the law. If your answer comes down to a question of fact I have probably made a mistake with the question. Assume that the companies are able to demonstrate statistically that both women and married people have lower rates of car insurance claims relative to men/single people. I think this would count as objective justification.