Exposure to air is what browns or ripens the bananas, so you want to avoid that. There are a few things you can do to avoid ripening the bananas or them turning brown. First, don't prep them ahead of time - only cut them when you're ready to assemble the pudding. This is one step you want to wait and do this step last minute.  Also, if you're going not going to serve immediately, wait to add the top layer of bananas until just before serving. OR cover the top of the pudding with plastic wrap with the plastic touching the bananas on top so there's as little air as possible. Last - use a plastic knife to cut the bananas. When you use a steel knife a chemical reaction occurs that causes the sliced bananas to ripen faster. Ultimately the bananas will start to turn brown in the pudding, which is why I recommend using just-ripe bananas. That will extend the life of your dessert. See below for a few other tips!