You're trying to treat async code as synchronous. Don't do that.
Here's your code:
// Declare local var
var studentObj = {};
// fire off an async request
MongoClient.connect("mongodb://localhost:27017/MY_DB_TEST", function(err, db) {
// render, not waiting for data to arrive from server
res.render('index', { title: 'Express', obj: studentObj });
This also explains the behaviour with global var. At first render it's still empty, but before second render the data request comes back and inits the global var. Solution is: render only after you got the data.
stream.on("data", function(item){
res.render('index', { title: 'Express', obj: item });
});