I just bought a Nikon D5100 kit with 18-55mm lens. I am now looking for a good portrait lens that should be good in low light conditions. I was thinking about buying Nikkor 1.8d 50mm or Nikkor 1.8G 50mm as my budget is very low. What factors should I consider in this decision, and are there other options I should look at as well?
A 50mm prime lens is a lens for general purpose (street photo, social photo, landscapes, and sometimes body full portraits), but a prime lens it isn't a portrait lens. (Video: www.youtube.com/watch?v=1R94PGPFoi4) (Article: cazillo.com/articles/37-photography/281-50mm-prime-lens-is-not-a-portrait-lens.html) Sorry, I'm new here and I lack enough karma for links. See the differences in these shots (backgrounds):
The king of portraits lens for Nikon is the AF-S 85mm 1.4G. But it's too expensive for a non-pro user, $1.600 !! (Review: www.lenstip.com/264.1-Lens_review-Nikon_Nikkor_AF-S_85_mm_f_1.4G-Introduction.html)
The amateur alternative is the AF-S 85mm 1.8G. $500 Review
But if you want a more versatile lens and capable to do very good portraits, you might look for these others: Nikon 105mm f/2.8 VR Micro (for macro-photograpy too).
The alternative for Nikon is the Tamron SP 90mm Di Macro (for macro-photograpy too), near quality and more cheaper.
The Nikkor 50mm f/1.8G has a focus motor in the lens, the Nikkor 50mm f/1.8D does not. Some Nikon bodies include a focus motor in the body that can drive the focus mechanisms of "D" series lenses. Since your Nikon D5100 does not have a focus motor in the body that could drive the focus mechanism of the 50mm f/1.8D, if you use the "D" lens you would need to manually focus the lens for each shot.
Some folks may consider 50mm a little short for portrait work. A lot depends on exactly what type of portraits you are doing. Environmental portraits and full or three-quarters length portraits should be okay on your D5100 body that has a n APS-C sensor, but you might find that focal length requires you to get a little closer than you want for tighter head shots.
Of course you mentioned a fairly constrained budget, and the 50mm lenses certainly fit the bill there.
Human faces are considered to have a flattering perspective at a distance of approximately 10'-15' (3m-4.5m). Closer than that gives increasing perspective distortion than exaggerates the features and is comsidered unattractive (wide angle distortion). Further away flattens the feature but this is usually not as problematic. So ideally, you'd want a lens whose focal length shows as much of your subject in your frame as you'd like when standing at a distance of 10' (3m) or greater. For a DX camera, a 50mm lens would be good for full body or 3/4 portraits. You'd need a longer focal length of around 200mm for a headshot at that distance.
A wide aperture is helpful for low light photography, and also helps to separate the subject from the background, so a fast prime is a good choice. If you are on a budget, f/1.8 is a good choice relative to f1.4 options, given the large difference in price for 2/3 stop difference in aperture.
So for you the Nikon 50mm f/1.8G is probably the best, most affordable choice for low light photography. A longer prime would be useful as well, but will be much more expensive.