You could insert a \phantom{-}
instruction immediately before \cos\theta
in the second row.
Oh, and don't use \bf
-- use \mathbf
instead. \bf
has been deprecated in LaTeX documents since 1994. It still works with the article
, report
, and book
document classes, but it no longer works with the KOMA-script and memoir
classes.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\begin{array}{c|ccc}
\hline
& \mathbf{b}_1 & \mathbf{b}_2 & \mathbf{b}_3 \\
\hline
\mathbf{a}_1 & \cos\theta & -\sin\theta & 0 \\
\mathbf{a}_2 & \sin\theta & \phantom{-}\cos\theta & 0 \\
\mathbf{a}_3 & 0 & 0 & 1 \\
\hline
\end{array}
\end{equation*}
\end{document}
Addendum: To make the array more "beautiful" -- a criterion you've mentioned in a follow-up comment :-) -- you may want to both fine-tune the horizontal positioning of the second and third data columns and give the entire array a more "open" look, e.g., by using the line-drawing macros of the booktabs
package.

\documentclass{article}
\usepackage{amsmath,booktabs}
\begin{document}
\begin{equation*}
\begin{array}{@{}ccc@{\qquad}c@{}}
\toprule
& \mathbf{b}_1 & \phantom{-}\mathbf{b}_2 & \mathbf{b}_3 \\
\cmidrule(l){2-4}
\mathbf{a}_1 & \cos\theta & -\sin\theta & 0 \\
\mathbf{a}_2 & \sin\theta & \phantom{-}\cos\theta & 0 \\
\mathbf{a}_3 & 0 & \phantom{-}0 & 1 \\
\bottomrule
\end{array}
\end{equation*}
\end{document}
$\phantom{-}\cos\theta$
.