Preheat oven to 375°F (190°C) and grease a 9x13-inch baking pan.
In a large mixing bowl, beat together the sugar, sour cream, butter, and eggs until smooth.
Add in the mashed bananas and vanilla extract, mixing until combined.
In a separate bowl, whisk together the flour, baking soda, and salt. Gradually add the dry ingredients to the wet mixture, stirring just until combined.
Fold in the chopped walnuts if using.
Pour the batter into the prepared pan and bake for 25-30 minutes, or until a toothpick inserted into the center comes out clean.
While the brownies are baking, prepare the frosting. In a medium bowl, beat together the softened butter and cream cheese until smooth.
Gradually add the powdered sugar and vanilla, beating until creamy and smooth.
Once the brownies are baked and slightly cooled, spread the frosting over the top. Cut into squares and serve.