Use the osascript command to execute AppleScript that presents a dialog and returns the result on its stdout or stderr. Read 'man osascript', then refer to any AppleScript tutorial on how to present simple dialogs.
Since AppleScript is typically framed as a "tell app "SomeAppHere" ..." series of statements, you can tell the app System Events to do things if you don't have any other app at hand. You can also browse and experiment with AppleScripts using Script Editor (Spotlight search for it). To get the scripting terms, command-shift-O will present a list of scriptable apps; choose System Events and dig in.
There are also other command-line runnable languages that can present a dialog. The ones that come to mind are more complex than osascript for a simple dialog, though.