What happens with a marriage if one spouse committed murder and is sentenced to life imprisonment?

Basically whatever you want to.

If you want to stay married you can. Some prisons have facilities for "Conjugal visits" where you can get together for a bit of intimacy. Also depending on how big a risk the prisoner is seen to be, and (probably) if the prisoner has been behaving or not.

If you want to get divorced you can do that too. Not that coming up with acceptable reasons for divorce has been a problem for quite awhile, but your spouse being put away for a long, long time will certainly qualify for grounds for divorce.

You'll have to apply for it though, it won't happen automatically.