Nalanda was founded around the 5th century AD and was home to some of the great Indian Mahasidas, such as Shantideva and Naropa (although there is some debate that he may have been from Vikramashila). For more information on the history of Nalanda Visit Wikipedea.
I would plan to spend 1-2 hours at Nalanda, as there is quite a bit to see but be aware that if the weather is hot there is very little shelter from the sun. Because it is a world heritage site entry for foreigners is Rs100 and rs 5 for locals.
Nalanda is approximately 2 hours by car from Bodhgaya but since it is very close to Rajgir then combining both into one trip is advisable, this can be comfortably done in one day, but it is best to leave as early (especially if you include the Mahakala Caves) as you want to be able to spend as much time as you can at these holy site.