In general, for both graduates and attendees of a graduation ceremony, business casual, which can mean a dress or dress pants and a nice shirt, is appropriate. However, the wardrobe also depends on the location of the ceremony (especially indoor vs. outdoor), the level of schooling represented and the season.
Graduates should take care to wear comfortable shoes they have already worn. Attendees may want to do the same, especially if the walk from the parking lot to the ceremony site is lengthy. Baccalaureate ceremonies are typically more formal, so suits are appropriate for men, and women should wear dresses or dress pants and a blouse.