The MBTA has been a real pioneer in making transit data publicly available for developers and researchers. See http://www.mbta.com/rider_tools/developers/ for a good source of data on MBTA bus and subway schedules, as well as some real-time location data.