GPIO Open Drain LED driving
Based on your diagrams...


Internal pull-up: The weak (10-50K) pull-up will source a small current when the OD FET is off. The LED would light, but only dimly
External pull-up: If the pull-up is low enough (less than 1K), the LED will light when the FET is off, and will be dark when the FET is on.


I don't know if that was your intention, but that's what those two circuits will do.

The second case has an implication for I/O voltage which I will discuss below.



Why use open-drain drivers for LEDs

LEDs have a forward threshold voltage (Vf) that varies with color. The shorter the wavelength, the higher the threshold. If you use a 3.3V supply, this is marginal for some LEDs (blue, violet, some white) that require 3.1V or more to achieve their Vf. So it's often necessary to use a higher Vcc (e.g., 5V) to drive them.

Open-drain drivers can translate lower MCU I/O voltage to higher LED voltage. But there's a catch.

The Problem with GPIOs: the Protection Racket

An MCU chip GPIO, programmed as 'open drain' like you show without an internal pull-up, will indeed only sink current. It can drive an LED, but only if the LED Vcc is no higher than the chip power GPIO supply.

So it's ok to drive a 5V LED if your MCU is also 5V, but not if the MCU is 3.3V.

Why?

The MCU's GPIO voltage, even open-drain programmed one, must not exceed its datasheet spec vs. the power supply. There is a breakdown limit set by the chip I/O structure; higher voltages will damage the chip.

Typically the MCU datasheet sets the I/O voltage limit to be between GND-0.5V to Vcc + 0.5V. That 0.5V comes in for a reason: there are ESD protection diodes to enforce that limit.

Here's a typical MCU I/O protection scheme (this one for PIC):



From here: http://embedded-lab.com/blog/tag/esd-protection/

So what happens with a 3.3V MCU and 5V LED Vcc? As shown in your second diagram, when the GPIO is off, the pull-up to 5V will continue to source current to the GPIO high-side protection diode which will clamp it to about 3.8V, or the LED will clamp it to somewhat above its Vf depending on the current.

While the I/O is protected, kind of, the LED won't light like you expect it to if it needs a higher Vf than 3.8V. Even worse, if Vf is above 3.8V, you've created a leakage path from 5V to 3.3V via the protection diode. You don't want that.

So, how to drive LEDs at higher-than-MCU voltage?


Use an open-drain buffers. Some allow a higher voltage on the open-drain output. For example, the LVC2G07 supports translating a lower MCU I/O voltage (e.g., 1.8V) up to a higher LED voltage (up to 5V.) These devices not only have sturdier FETs that can take the voltage, but also have have different ESD protection schemes for the output that make them 5V tolerant.
Use a discrete N-FET. These are true open-drain. As the FET has no ESD diodes, the only LED voltage limit is the max drain-source voltage (Vds) it can tolerate.