Renaming a baby in The Sims can be done a couple of ways. Here's the more advanced method, followed by a much simpler one.
1. Open the cheat box by pressing Ctrl+Shift+C and type boolProp testingCheatsEnabled true.
2. Hold Shift and click on the baby you want to rename. Among the options, select Make Selectable. (If the baby vanishes from the family list on the left, just Shift-click it again and choose Make Selectable once more.)
3. Now you can select the baby from the family list on the left by clicking its icon.
4. Shift-click the baby again and choose Spawn, then Tombstone of L and D.
5. Still controlling the baby, click the tombstone and select Rename Sim.
6. Give your baby a delightfully silly name, like Frazzlehead-McSpazatron.
1. Select the baby (or toddler, whichever you're renaming).
2. Switch to map view.
3. Click on City Hall and choose Change Name.
4. A parent or older Sim will then take the baby to change its name.
Note: This simpler method works for Sims of any age—from newborn to elder, and even ghosts!