Display dialog from command line (like xmessage does)

One option is to tell a background process like SystemUIServer to display the dialog:

osascript -e 'tell application "SystemUIServer"
display dialog "message"
end
activate application (path to frontmost application as text)'

You can also tell the frontmost application to display a dialog, but it's not shown immediately if the application is not responding. If MPlayer OS X is frontmost, text dialogs don't accept any keyboard input.

osascript -e 'tell application (path to frontmost application as text)
display dialog "message"
end'

Try

tell application "System Events" to display dialog "Plug the Digispark into the USB port." buttons {"OK"} with icon caution

Tested on OS X 10.8.2