You don’t build a secret base underground. In Diamond/Pearl, bases are pre-existing locations on the overworld map (glowing spots in forests, caves, mountains). Steps:
Find a glowing spot.
Enter to access the base.
Decorate with furniture, traps.
Connect via Wireless to share/visit others’ bases.
Diamond alone (without Pearl) doesn’t have this feature.