A former Harvard University student has been indicted in connection with the May 2009 shooting death of Justin Cosby, 21, of Cambridge, Middlesex District Attorney Gerry Leone said.