Re: how does a phone use its data though the night when not being used.
Further to teabag's answer, your mobile data usage is rolled up for the day and billed at some point after midnight. For this reason you may appear to be using data even if your phone is switched off overnight.
With the exception of MMS messages, your phone will always use wifi rather than mobile data if connected to a wifi router. Most smartphones will disable wifi after a set time in standby to save battery. If the operating system or an app decides it needs some data (a lot of them still run, even in standby) that's when it resorts to mobile data.