How can I program a surface-mount Atmega328?
One option is use a TQFP-32 socket and connect the necessary pins in your AVR Dragon.




  Source: http://jeelabs.org/2009/07/11/programming-a-32-tqfp-chip/


Or you can program the device directly in your board after soldering the ATMega328. I suppose that you didn't prepare your board with a connector for JTAG or ISP like explained here: http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/AVRDragon/AVRDragon_ISP_Description.htm

So you will have to soldering some wires and connect in your AVR Dragon. You can create an adapter like this picture:




  Source: http://jeelabs.org/2012/01/04/isp-programmers/