Some phones turns off WiFi features when the phone goes to sleep (i.e. when the display turns off). They do this as WiFi connection = 1 more thing that is on = more battery usage = less usage of the phone for you.
Assuming you have a smartphone, look through the options to see if there's an "Always On WiFi" feature, and if not, download an app that does it.
Also, note that smartphones still do check for e-mails, updates for your calendar, news (RSS feeds), etc. even when they are asleep (unless you specifically set the settings for them not to). So while your phone was asleep, not on WiFi and AT&T's network, it was using data.
If your phone has the ability, I would strongly recommend to deactivate the data network while using Wi-Fi instead of the regular network. I do this all the time when I want to use Wi-Fi, and since the phone cannot connect to the server using the data network, no charges would be implemented, resulting in no data being used/subtracted from your monthly amount.