Personally, I tried to get it to do a "turn data on when I have the display on, otherwise turn data on every X minutes/hours", but handling all the corner cases was difficult.
Plus, programming in the Tasker UI is fiddly.
According to this [1] StackOverflow answer there is no API support for enabling/disabling mobile data, but it can be done using reflection. Process requires CHANGE_NETWORK_STATE permission.