There's nothing special: assuming you've defined a bar family of keys
\NewEnviron{foo}[1]{%
\setkeys{bar}{#1}%
do something with \BODY
}
or
\NewEnviron{foo}[1][]{%
\setkeys{bar}{#1}%
do something with \BODY
}
will allow the syntax
\begin{foo}{key1=value1,key2=value2}
text
\end{foo}
or
\begin{foo}[key1=value1,key2=value2]
text
\end{foo}
respectively. Which one to prefer depends on many factors: if the user has to supply at least a key-value pair, then the first form is recommended.
I've used \setkeys, as I don't know how keycommand works (it should be very similar, anyway).