You can .try a style that has a name combined from the x and the y value of the current node. (Without the .try handler you’d need define every possible style combination.)
Sadly, \tikzset cannot used inside a \foreach loop as this executes its body only locally.
I thought about defining global PGF keys but I think the etoolbox solution is easier to adapt.
The \foreach loops “collect” all \tikzset which we later execute with \myTikZsets.
Code 1
\RequirePackage[dvipsnames]{xcolor}
\documentclass[tikz]{standalone}
\usepackage{etoolbox}
\begin{document}
\begin{tikzpicture}[
every node/.style={circle,draw,minimum size=2.0em},
darkstyle/.style={fill=MidnightBlue!25},
lightstyle/.style={fill=Green!25},
redstyle/.style={fill=red!25},
style for 1-3/.style={redstyle},
style for 3-3/.style={redstyle},
]
\foreach \x in {0,...,4} {
\foreach \y in {0,4} {
\xappto\myTikZsets{\noexpand\tikzset{style for \x-\y/.style=lightstyle}}
}
}
\myTikZsets % use the stored \tikzset calls
\renewcommand*{\myTikZsets}{}% and empty it again (for later use)
\foreach \x in {0,...,4}
\foreach \y in {0,...,4}
{\pgfmathtruncatemacro{\label}{5 + 5*\x - \y}
\node [darkstyle, style for \x-\y/.try] (n-\x-\y) at (1.5*\x,-1.5*\y) {\label};}
\foreach \x in {0,...,4}
\foreach \y [count=\yi] in {0,...,3}
\draw (n-\x-\y)--(n-\x-\yi) (n-\y-\x)--(n-\yi-\x) ;
\end{tikzpicture}
\end{document}
Code 2
With the example you have given this can also be made with plain TeX \ifnums.
\RequirePackage[dvipsnames]{xcolor}
\documentclass[tikz,convert=false]{standalone}
\begin{document}
\begin{tikzpicture}[
every node/.style={circle,draw,minimum size=2.0em},
darkstyle/.style={fill=MidnightBlue!25},
lightstyle/.style={fill=Green!25},
]
\foreach \x in {0,...,4}
\foreach \y in {0,...,4}
{\pgfmathtruncatemacro{\label}{5 + 5*\x - \y}
\ifnum\y=0
\tikzset{darkstyle/.style={lightstyle}}
\fi
\ifnum\y=4
\tikzset{darkstyle/.style={lightstyle}}
\fi
\node [darkstyle] (n-\x-\y) at (1.5*\x,-1.5*\y) {\label};}
\foreach \x in {0,...,4}
\foreach \y [count=\yi] in {0,...,3}
\draw (n-\x-\y)--(n-\x-\yi) (n-\y-\x)--(n-\yi-\x) ;
\end{tikzpicture}
\end{document}
Output

\foreach \list in {22,33,44}{ \ifnum\x\y=\list \node [thick, darkstyle, fill=green!70!blue,minimum size=2.5em] (\x\y) at (1.5*\x,1.5*\y) {\label};\fi}– Claudio Fiandrino Apr 05 '13 at 07:57