First, let me give an incorrect argument:
Working in $V[G]$, suppose $X_\eta$ ($\eta\in\kappa$) is a $\kappa$-sequence of sets in $M[G]$. Then we get a $\kappa$-sequence of names $\nu_\eta$ in $M$ which correspond to those sets: $\nu_\eta[G]=X_\eta$. Since $M^\kappa\subseteq M$, we have $(\nu_\eta)_{\eta\in\kappa}\in M$. But from this and $G$, we can construct the sequence $(X_\eta)_{\eta\in \kappa}$ in $M[G]$. So $M[G]^\kappa\subseteq M[G]$.
Why is this wrong? Well, the sequence $X_\eta$ exists in $V[G]$, not $V$; so $V$ might not see the sequence of names $\nu_\eta$. If $V$ doesn't see it, then $M$ doesn't have it, and so we're stuck.
How do we get around this? I'll answer for the $\kappa^+$-c.c. case; hopefully it will be clear how to handle this for the distributive case.
Suppose the theorem fails. Then there is a name $\mu\in V$ for such a sequence of names $\nu_\eta\in M$ which give a sequence of sets in $M[G]^\kappa$ but not $M[G]$. Now, the key point is that each $\nu_\eta$ is in $M$, and hence in $V$! So what $\nu_\eta$ is, is forced by some single condition in $G$.
For each $\eta$, let $A_\eta$ be a maximal antichain of conditions which decide what $\nu_\eta$ is. By the chain condition on $\mathbb{P}$, $A_\eta$ has size $\le\kappa$; by the closure condition on $M$, this means $A_\eta\in M$, and by the closure condition again the sequence $\mathcal{A}=(A_\eta)_{\eta\in\kappa}$ is in $M$. But from $\mathcal{A}$ and $G$, we can construct the sequence of $X_\eta$s in $M[G]$: given $\eta$, look for a condition $p\in G$ which forces a value for $\nu_\eta$, and then evaluate that name.