In Livin' Large, they can be made at the KraftMatic Woodworking Table. One of the spells in The Sims: Makin' Magic can temporarily bring a garden gnome to life as a gardening gnome, which will take care of plants.
In The Sims 2, The Sims 3 and The Sims 4, they can be bought as garden decoration. In The Sims 3, Sims can purchase (through buy mode) or find Sleeping Gnome McMulty.
In Nightlife, a guest may attempt to steal a gnome from the lawn, though not when the game camera is focused on them. If the gnome is stolen successfully, any Sim in the household can retrieve it, and it will appear in his/her inventory.
In The Sims 2 Castaway and The Sims 2: Pets, there is a gnome called "Shifty Sam the garden gnome". In reference to his name, Shifty Sam will appear in different places on the lot when kicked over and left alone long enough, similar to the Mysterious Gnomes of The Sims 3.
In The Sims 3: Pets in Buy Mode there are garden gnomes which can bring animals to a lot. There is a gnome for cats, dogs, and wild animals.