It's pretty obvious the role they played. They're expected to be the arbiters of what the risk is. They were setting the risk value for things they had no clue about. It was simply incompetent negligence and no one should be trusting them anymore.
It's a lot worse than 'setting the risk value of things they had no clue about.' It was, flat out, a conflict of interest:
The AAA ratings given by the agencies proved to be wildly inaccurate and unreasonably high, according to the suit, which also said that the methods used by the rating agencies to assess these packages of securities were seriously flawed in conception and incompetently applied
The ratings agencies no longer played a passive role but would help the arrangers structure their deals so that they could rate them as highly as possible, according to the Calpers suit.
More @ http://www.ritholtz.com/blog/2009/07/calpers-rating-agencies... (this is just but one example of Barry Ritholtz extensive coverage of this issue. McGraw Hill dropped his book b/c of his payola (acurrate) line about S&P's efforts at this in particular.