A small LED light can be used to sex a baby lizard by “candling” the base of the tail, much like candling an egg, by holding the lizard on its back so the vent and base of the tail is exposed, and holding the light on the lizard’s skin, to the side of or a bit dorsally to the vent, so that the light illuminates the area below the vent where the hemipenes are.
The light I use is sold as a laser pointer which I buy at the dollar store. One end has a laser pointer on it, the other end has an LED light. The LED light is the end that is used for this “candle sexing” procedure. It also works well for candling lizard eggs.
In lizards that hatch out a little larger, such as the baby basilisks in the photographs below, the hemipenes are clearly visible as red areas. In some lizards, especially smaller hatchlings of species like my Gallotia stehlini, rather than seeing actual hemipenes, two tiny hair-like red blood vessels which supply the hemipenes are what is visible and they can be a little tricky to see.
Maybe for some species the hemipenes aren’t as developed yet or maybe they just don’t have the bloodflow other species have. At any rate, moving the light around a little bit so the angle of illumination changes can often help clarify things a bit.
I follow this procedure as I remove the animals from the incubator in order to sort the lizards immediately according to their sex, so that later when I am making decisions I already know the sex of the lizards.