Your Tamagotchi character has to be on generation 2 or higher to visit its parent, and generation 3 or higher to visit its grandparent.
V3: Go to the V3 TamaTown site and click on the Parents or Grandparent's house. A password prompt will appear.
Quote from V3 TamaTown parent / grandparent house online help:
>>
Before you can visit your parents / grandparent, you need to get a password from your Tamagotchi toy.
Here's how:
1. On your toy go to the Friend list icon, and press the (
button to select it.
2. Then, use the (
button to select "Family" and press the (
button again to select "History."
3. Select your grandparent, and press the (
button. This should give you a password.
4. Now take the password you get from the Tamagotchi toy, and enter it here!
<<
Note: to visit the parent in V3 TamaTown, you need to use the parent password from your Tamagotchi toy, and to visit the grandparent in TamaTown you need to use the grandparent password from your Tamagotchi toy. In the Family list, your Tamagotchi character's parent will be shown with the number 1 in the upper right corner, and her/his grandparent will be shown with the number 2 in the upper right corner.
- - - - - - - - - - - -
V4: There is no special password needed. Your Login Password for V4 TamaTown has the parent & grandparent information in it.