One way (pretty verbose) is to expand two loops into a single one, but loop over three variables (the coordinates and color):
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{figure}[h!]
\centering
\resizebox{\textwidth}{!}{%
\begin{tikzpicture}[text centered]
\foreach \i / \j / \c in
{0/6/red, 1/6/white, 2/6/white, 3/6/white,
0/5/white, 1/5/white, 2/5/white, 3/5/white,
0/4/white, 1/4/white, 2/4/white, 3/4/white,
0/3/white, 1/3/white, 2/3/red, 3/3/white,
0/2/white, 1/2/white, 2/2/white, 3/2/white,
0/1/white, 1/1/red, 2/1/white, 3/1/red,
0/0/white, 1/0/white, 2/0/white, 3/0/white}
\filldraw[fill=\c] (-8+0.6*\i,1.8+0.6*\j) rectangle (-7.5+0.6*\i,1.3+0.6*\j);
\end{tikzpicture}
}%
\end{figure}
\end{document}

Or you can store the properties into a separate file (you can generate it programmatically), and do the following (the idea is taken from Reading the data to iterate over with \foreach from a file):
\begin{filecontents*}{\jobname.dat}
0/6/red, 1/6/white, 2/6/white, 3/6/white,
0/5/white, 1/5/white, 2/5/white, 3/5/white,
0/4/white, 1/4/white, 2/4/white, 3/4/white,
0/3/white, 1/3/white, 2/3/red, 3/3/white,
0/2/white, 1/2/white, 2/2/white, 3/2/white,
0/1/white, 1/1/red, 2/1/white, 3/1/red,
0/0/white, 1/0/white, 2/0/white, 3/0/white
\end{filecontents*}
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{catchfile}
\newcommand\loaddata[1]{\CatchFileDef\loadeddata{#1}{\endlinechar=-1}}
\begin{document}
\begin{figure}[h!]
\centering
\resizebox{\textwidth}{!}{%
\begin{tikzpicture}[text centered]
\loaddata{\jobname.dat}
\foreach \i / \j / \c in \loadeddata
\filldraw[fill=\c] (-8+0.6*\i,1.8+0.6*\j) rectangle (-7.5+0.6*\i,1.3+0.6*\j);
\end{tikzpicture}
}%
\end{figure}
\end{document}
The file \jobname.dat is included into the main file for convenience only.