I do what Black Bud and Raiyn do... back of rack, and using the plastic bracket bolted on.
I've also used a six-inch-long piece of narrow aluminium flat bar attached to the anchor bolt of the seat post, and with the plastic bracket attached along with the light. The arrangement becomes ineffective when using a trunk bag. However, is useful when I don't have a rack on and use a Brooks saddlebag.