Generally you need single convex lens. Plani-convex is better, in which case you put the flat side toward the diode, and curved toward the parallel beam.
You can think of the diode as point light source .. so to get parallel (collimated) beam you have to place the diode in the focal point of the lens.
Also you have to know, that large output aperture will make the beam thicker at the beginning, but it will have lower divergence due to diffraction.
Since most diodes emit at angle about 60 degrees, you need lens which size and focal distance are roughly same .. so if you put diode into the focal point, the beam will cover whole lens. If the beam is wider than the lens, you are not collimating all the energy, if it is smaller, you don't use all lens area and you have smaller effective output aperture.
Common sunglass will work great. Lens in pointers are usually very small, thus very strong (short focal distance).
Some better lens have more elements .. but I'm not quite sure how is that good, probably it should lower the spherical aberration of the lens, but imho the plani-convex should do that pretty well.
Another problem is lens material and coating. You want to minimize the losses. Every air-glass transition will reflect some part of the light .. so better lens use special specific wavelength tuned coating to minimize that. This also usually means that simpler (single element, all mirror setup) is better, as there is fewer air-glass transitions.
Also with non-visible wavelength you might have to use different lens material than glass, as it might not pass that wavelength at all.