Why do I occasionally get the message "could not activate cellular data network" when opening the sms app? It pops up a message telling me this which means I have to tap 'OK'

This is seriously annoying, does anyone know why this happens and what terrible event it is supposed to help me avoid?
This is annoying but you can't turn it off unfortunately.  If the iPhone detects a momentary loss of connection to the cell tower and it believes the user is interacting with the phone then it will pop this message up.  It's intention is to let you know that you don't have a signal and therefore won't be able to send your SMS, email etc. however more often than not it's a sub-second blip in the signal rather than a total loss.  If you watch closely you'll sometimes see the signal bars disappear and reappear as the signal is reacquired.

You could try going to Settings > General > Reset > Reset Network Settings to see if somehow you've altered some network setting which is affecting your reception but you'll lose wifi passwords etc I think if you do that.