There doesn't seem to be much evidence that tanning is bad for your unborn child but don't think you can get your JLo glow without someone telling you to play it paranoid.
All I can find is that overheating is the big worry but, interestingly, that's only applied to tanning beds. I couldn't find anything that said tanning on the beach was bad for your baby so isn't that kind of the same thing? Can your fetus tell if you're in Mexico? Sneaky bugger.
Anyway, aside from all the associated dangers that go along with tanning for you (skin cancer and a haggard face, that will be further enhanced by motherhood, and all that fun) there doesn't seem to be a problem. Keep an eye out for patches of skin that darken unevenly though – pregnancy can do some weird stuff with your homones than cause a temporary increase in your body's production of melanin. Other than that, rock that bikini hard, bitch!
As for spray tanning, you're safe there too. The main ingredient in self-tanners is a non-toxic colour additive, called DHA, that reacts with amino acids in the outer layers of the skin to creating a tan. It is only absorbed by the upper layers of skin, so it has been deemed safe in pregnancy. Most sites recommend creams, foams, etc. over a tanning booth because of the chances of inhalling the tanning spray and, as with most things, they aren't exactly sure if that's a good thing or not. As with traditional tanning, your hormones may be doing crazy things so do a trial run before you bronze it up the day before your sister's wedding in case you end up looking like mouldy raisin.
Lastly, do NOT take tanning pills or get tanning injections. I didn't even know either existed but they sound like something that's smuggled into the country and sold in Flea Markets next to the Shamwow knockoffs so I'd steer clear of those pregnant or not.
search: tanning while pregnant, dangerous tan pregnancy, sun and pregnancy