Having a child is a joyous occasion for the parents and family. For Muslims, every event is governed by the Shari'ah and Sunnah. Expressing happiness and giving gifts for a new-born or child to be is permissible and encouraged according to one's means. However, to create a formal event for this purpose is not in keeping with Islamic teachings and practice.
The idea of inviting guests to a function and engaging in extravagance and wastage is becoming common for this purpose. People should be allowed to gift and visit informally according to their convenience and means. A baby shower makes it awkward and difficult for people and puts pressure on people to 'bring that gift'. Hence, we strongly discourage this practice.
More important than the material gifts is for family and friends to seek Allah Ta'ala's protection and wellness for the child to be and to make dua for the goodness of the child's future. These duas and good thoughts are more valuable for the child than the 'material' gifts of the world.