How to use data connection on Apple Watch I just paired up  my Apple Watch with my iPhone 7.  I noticed that only phone calls work while my iPhone is turned off and data/messages do not work at all. Only way to use data on my watch is while my iPhone is turned on.  

Reading the apple web site suggests that both (watch and phone) need to be connected to cellular network in order to use all features of my watch. For example if I leave my phone at home and go to the park with my watch, only way I will be able to send emails and messages from my watch is if my phone that I  left at home is turned on. 

Can somebody explain me how this works and which preconditions need to be fulfilled for me to use data connections on my watch?
I noticed that only phone calls work while my iPhone is turned off and
  data/messages do not work at all. 


This is expected behavior.  In order to use messaging features not only must your iPhone be be on, but it must be signed into iMessage (meaning connected to Wifi and/or cellular.  The phone doesn't not need to be with you, however.


  Only way to use data on my watch is while my iPhone is turned on.


Not exactly.  If an App requires data, it can use it even if your phone is not connected - the limitation is only for messaging apps (SMS, MMS, iMesage, etc.)


  Can somebody explain me how this works and which preconditions need to
  be fulfilled for me to use data connections on my watch?


To use data on your Apple Watch (Series 3 and 4), you just need to be connected to either a cellular network or a WiFi network.  

Apple has an excellent support document How to use your Apple Watch without your iPhone nearby that goes into detail about what's required to use your Apple Watch with cellular.