To unlock a Mystery House in Viva Piñata, you need to attract two specific types of piñata to your garden.
The first is a Swansea, which is the swan piñata, and the second is a pig piñata, which you can buy directly from the pet shop. Once both of these residents are visiting your garden, the conditions line up and the Mystery House becomes available. Focus on meeting their requirements, and the mystery house will soon be yours to open.