How to highlight table rows by colors in Beamer

This is a simpler solution.

Just load the xcolor with the options table in the \documentclass. Because beamer loads by default xcolor package, therefore, it is necessary to pass the options in the \documentclass.

\documentclass[xcolor=table]{beamer} %-- pass the option table to xcolor package
\begin{document}
\begin{frame}
\frametitle{Famous Composers}
\begin{center}
    \rowcolors{1}{}{lightgray} %-- this indicates the change in odd and pair rows
    \begin{tabular}{|l|c|}\hline
    J.\ S.\ Bach
    & 1685--1750 \\
    W.\ A.\ Mozart & 1756--1791 \\
    L.\ Beethoven & 1770--1827 \\
    F.\ Chopin
    & 1810--1849 \\
    R.\ Schumann
    & 1810--1856 \\
    B.\ Bartok & 1881--1945 \\ \hline
    \end{tabular}
\end{center}
\end{frame}
\end{document}

Result: Result for the example

sources:

Use xcolor for colored tables in a beamer slide

http://www.tug.org/pracjourn/2005-4/mertz/mertz.pdf


For a simple customized static row colouring :

\documentclass{beamer}
\usepackage{color, colortbl}
\definecolor{LRed}{rgb}{1,.8,.8}
\definecolor{MRed}{rgb}{1,.6,.6}
\definecolor{HRed}{rgb}{1,.2,.2}
\begin{document}
\begin{frame}
\begin{tabular}{ccc}
\rowcolor{LRed} a & b & c \\
                 a & b & c \\
\rowcolor{LRed} a & b & c \\
\rowcolor{MRed} a & b & c \\
\rowcolor{HRed} a & b & c \\
\rowcolor{MRed} a & b & c \\
\rowcolor{LRed} a & b & c \\
\rowcolor{MRed} a & b & c \\
\end{tabular}
\end{frame}
\end{document}

For overlays of odd/even coloring of the link of cmhughes or some more complex, see this MWE:

    \documentclass[xcolor=table]{beamer}

    \rowcolors{1}{gray!30}{gray!10}

    \makeatletter
    \def\rowcolor{\noalign{\ifnum0=`}\fi\bmr@rowcolor}
    \newcommand<>{\bmr@rowcolor}{%
        \alt#1%
            {\global\let\CT@do@color\CT@@do@color\@ifnextchar[\CT@rowa\CT@rowb}% 
            {\ifnum0=`{\fi}\@gooble@rowcolor}% 
    }

    \newcommand{\@gooble@rowcolor}[2][]{\@gooble@rowcolor@}
    \newcommand{\@gooble@rowcolor@}[1][]{\@gooble@rowcolor@@}
    \newcommand{\@gooble@rowcolor@@}[1][]{\ignorespaces}
    \makeatother

    \begin{document}
    \begin{frame}{The MWE}%

    \only<2>{\rowcolors{1}{blue!30}{blue!10}}
    \only<1,3>{\rowcolors{1}{gray!30}{gray!10}}

    \begin{center}
    \begin{tabular}{cc}
        A & B \\
        A & B \\
        A & B \\
        \rowcolor<4>{green} A & B \\
        \rowcolor<4,5>{yellow}A & B \\
        \rowcolor<4-6>{green}A & B \\
        \rowcolor<6>{red} A & B \\
        A & B \\

    \end{tabular}
    \end{center}

    \par    
    \visible<1>{Testing default row colouring ... \\}
    \visible<2,3>{Testing change of default colors ...\\}
    \visible<4-6>{Testing in-out of custom colors ...\\ (caution: The order of defaults colors can change)\\}

    \vfill
    \scriptsize{
Based of answer of Martin Scharrer
\url{http://tex.stackexchange.com/questions/18427/why-cant-i-wrap-rowcolor-in-only-beamer}}

    \end{frame}

    \end{document}