Short answer. Not under this article. Article 290 punishes a private individual who seizes another's papers or letters to discover his secrets, but the same article says expressly that it does not apply to spouses with respect to the papers or letters of either of them. Other statutes may still be engaged.
What the law says
This provision shall not be applicable to parents, guardians, or person entrusted with the custody of minors with respect to the papers or letters of the children or minors placed under their care or custody, nor to spouses with respect to the papers or letters of either of them.
Revised Penal Code, Article 290 — Seizing Correspondence To Discover Secrets. Read the full provision →
What the article punishes, and who it exempts
Article 290 is aimed at a private individual who, in order to discover the secrets of another, seizes that person's papers or letters. It grades the offence by what followed: a heavier penalty where the contents were revealed, a lighter one where they were not. Then it carves out a group. This provision shall not be applicable to parents, guardians, or person entrusted with the custody of minors with respect to the papers or letters of the children or minors placed under their care or custody, nor to spouses with respect to the papers or letters of either of them.
The exemption is narrow and textual
The exclusion covers spouses in respect of each other's papers or letters, and that is all it covers. It does not extend to a partner who is not a spouse, to a former spouse after the marriage has been dissolved, or to third parties acting at a spouse's request — a person who takes another's correspondence for someone else is not the spouse and cannot borrow the exemption. The Code's choice here reflects the position of a married couple in its own scheme, not a general licence attaching to close relationships.
This article is not the whole of the law on the subject
The question asks about letters or messages, and the two are not on the same footing. Article 290 speaks of papers and letters. Electronic communications, stored data and recorded conversations are dealt with by separate legislation enacted long after the Code, and those statutes have their own definitions, their own exceptions, and no equivalent spousal carve-out written into them. So an answer confined to this provision is genuinely an answer confined to this provision, and it should not be read as clearance for accessing a spouse's accounts or devices.
Being outside the article is not the same as being useful
People usually ask this question because of what they hope to do with what they find. That is a separate matter. How material was obtained can affect whether it may be used in a proceeding, and it can expose the person who obtained it to other kinds of liability even where no offence under this article was committed. If the underlying situation is a marital dispute, the sensible order is to take advice on what evidence would actually help before doing anything that cannot be undone.