Check $STY. If it's null, you're on a "real" terminal. If it contains anything, it's the name of the screen you're in. If you use tmux instead of screen, also check $TMUX. To add this to your prompt, add the following to your ~/.bashrc:

If the cursor jumps to the start of the line, I'm not inside a screen session.

If nothing happens, I know that I'm inside a screen session and that I've just used the screen control key. I then hit a (jump to the beginning of the line), w (show current screen windows) or execute some other "harmless" screen command to get back to the command prompt.

(Of course, this only works if you are currently executing bash or some other piece of software that "jumps to the start of the line" or does something equivalently harmless when hitting Ctrl-a.)

you could also recurse up the process tree from $$ to see if you find a screen instance. the exact chain will probably depend on your setup--on my OS X box, a zsh inside screen has login as its parent, SCREEN as its grandparent, and screen as its great-grandparent.