When recording with any type of microphone, placement is key. The sound of the room will be a major factor in how the instrument sounds when recorded. A DI will not capture the sound of a room and therefore feels more isolated. A piezo pickup will capture certain aspects of the outside recording environment (i.e., the room) and can provide some interesting effects due to its placement inside the sound hole. If the means are available (e.g., a mic preamp with at least two channels or an interface with at least two mic pres), it is best to record both simultaneously. You will have the option to pick and choose, as well as mix in a percentage of both within the context of your recording.
Do I need a DI box?
Not necessarily. The pickup of your acoustic/electric or your mounted pickup needs to be amplified and the components used to do so will influence the sound. If your pickup has gain settings (found on active pickups or soundhole-mounted preamps), you can plug directly into your audio interface's line input and control your gain settings right from the guitar. If your guitar pickup is passive, you will need some amplification by way of an active DI box (with preamp options to boost your guitar signal), an external microphone preamp or the preamp built into your interface. It all comes down to your choice of amplification, what you have available and what sounds best to you.
Recording tip: When placing a microphone, consider how it is designed. The mic is built to mimic the behavior of your ear and how it translates vibrations into perceivable sound. If you happen to be the engineer, take a stroll around the room while listening to the musician playing his or her instrument. Note how the sound changes with every inch of your movement throughout the room. Take mental notes of where it sounds best to you as you walk in close, move farther away, get on a stepladder, etc. After you’ve determined where it sounds best, place the microphone in that exact location—ideally, pointing it in the same direction as your nose. Keep in mind, a dynamic mic will require a lot more sound pressure to respond (move the diaphragm) and therefore should not be placed too far from the instrument. Condenser mics require very little sound pressure to emit a response. Condensers are more suited for distance miking. If you have a few available mic pres, try using a few different microphones in a few different locations that sound good to you. Sure, all the recording books out there will recommend common placements, but these are merely a place to start. Let your ears be the judge. If it does not sound satisfying to you, move the mic before reaching for the equalizer.