You're always free to share whatever you want to share, but should never feel pressured to provide info that could be discriminatory. If you felt like answering with the details of your personal life - the choice is yours.
If you'd prefer to avoid that, since it CAN be discriminatory - answer the concern, but not the question:
Let me reassure you, I'd also prefer a long-term association provided we work together well. It fits well with my personal life, and it looks like a place I'd be happy in for a long time because of XYZ good things about the company. The only reason I'd consider leaving is ABC potential issues - do you have any thoughts on whether that would be a problem?
And I'd skip having one of "ABC potential issues" being - "you flout US law by asking inappropriate and discrimantory questions about my personal life, are there any other laws you violate?" - true as it may be... it's rather a non-starter in terms of getting off on the right foot with a potential boss/coworker.
Depending on the nature of the interview and your overall personal feelings of connection to the interviewer, it may be worth your while to mention it to your HR liason or whoever seems to be coordinating the interview agenda. It should be OK to say to that person:
Just so you know - I was asked a question that I found off-putting. The interviewer asked about my martial status. He seemed to indicate that it's not typical company policy. I wasn't quite sure of what to say, since I honestly believe it's none of his business. I did my best to address the overall concern - my commitment to staying in the company long-term - but felt pretty uncomfortable with the whole thing.
At this point, you're testing them - subtly. It's about the kindest heads up you can give them that one of their employees is opening them up to potential litigation - you've been honest, non-threatening, and truly concerned because you are a team player and a decent person - not some jerk in it for a lawsuit.
What I'd be looking for in this situation is to hear back in a week a reasonable response from the representative I talked to. If they are smart, they'll do something along the lines of:
send an honest apology and a job offer because they liked you and want to hire you
send an honest apology and ask you to reinterview with a different person - probably because they really couldn't trust the interview process at that point
If they try to ignore it or sweep it aside, you have to wonder if other legitimate legal concerns will also get similar treatment. If they don't hire you, chances are good that you'll never know why, and it's your call whether you want to follow up with a laywer and a lawsuit. But at least you showed them who you are - someone who wanted to be part of the company, but who wasn't willing to overlook a potentially serious issue just to please management.
In all honesty - I'm not sure what I'd do either. It's hard to have the presence of mind to pull this off eloquently in the moment. It's much easier when you are sitting in privacy typing an answer to a Stack Exchange. :)