To be clear, you can spend the surge on that ability whether you're dealing damage or not, but the affected figure will not receive the Stun condition unless at least one point of damage is also dealt. This can be important for things like AoE attacks where each affected figure rolls defense dice separately - some may receive the condition while others do not, based on their defense rolls.
Also note that there's a shield (Iron Shield?) that allows you to Stun a different figure than the one you were attacking. FFG has said that this shield may still apply the condition even though it didn't hurt the figure that Stun was being placed on. That's an exception to the general rules, though.