\documentclass{article}
\usepackage{etoolbox}
\usepackage{tikz}
\usetikzlibrary{matrix}
\let\mystyle\empty
\newcommand{\populatestyle}{%
\foreach \c [count=\i] in {red, green, blue} {
\begingroup\edef\x{\endgroup
\noexpand\gappto\noexpand\mystyle{column \i/.style=\noexpand{\c\noexpand}, }}\x
}%
}
\populatestyle
\begin{document}
\begin{tikzpicture}[\mystyle]
\matrix (m) [draw,matrix of nodes] {
1 & 2 & 3 & 4 \\
5 & 6 & 8 & 8 \\ };
\node[text width=7cm] at (0,3) {The content when expanded: \mystyle};