I did this recently with the current Debian installer RC. If you
download the netinst or CD1 ISO image, you can simply dd it to
the USB pendrive directly, and it will boot with UEFI or legacy
The hardest part was getting the key to boot. The main thing to
look out for is that "secure boot" *must* be disabled or else
you can't boot it. My ASUS board UEFI BIOS had some annoying
bug whereby it was silently re-enabling it behind my back, causing
countless frustration as I spent hours trying to make it boot.
Also, if you can disable booting from legacy BIOS to ensure that
only the UEFI boot method shows up (the pendrive will support both,
but you can't install it properly unless you boot in UEFI mode).
Another gotcha is that the chainloader can sometimes start
booting from one medium and switch to another if you have
multiple pendrives or CDs available; note that this is mainly
an issue when secure boot is enabled, and it'll silently skip
booting from an "insecure" medium.