When to replace an egg with a banana:
Use a banana instead of an egg if you don't mind your muffins, breads, or other things tasting like banana in addition to the other ingredients. If you want a very robust blueberry muffin, a banana might take away from the star of the show. However, if you want some nutty bran muffins, the banana might make your breakfast take on a whole new level of awesome.
When to use the egg:
Use the egg if you are making pancakes. I tried substituting an extra banana for the egg in my banana pancakes and I ended up with a very thin stack of pancakes. I think this may be because the banana just wasn't up to the task of holding together the gluten network that needs to form for pancakes to get fluffy. Also use the egg if you aren't looking for banana undertones in your food.
Note: I've never tried substituting bananas in cookies... If any of you have, let me know how that turned out! I may need to experiment with that.