You get delivery receipts when a message has been successfully delivered. If it doesn't get that or fails to communicated with Apple's server it will revert to sending as SMS provided you have that option enabled.
Doesn't necessarily work that way. (which is really stupid on Apple's part)
My wife and I both have iphones, but do not turn on cellular data, only Wifi.
Our phones have iMessage turned on, and "sends as SMS if iMessage fails" turned on as well.
One afternoon, I needed to sms I needed to sms my wife, so I opened the message app, and the bubble was blue? (I have wifi at my office, but my wife doesn't). So I send an iMessage anyways, since I'm assuming that Apple's servers would automatically check to see if my wife's phone was "online", find that it isn't, and resend as an SMS.
Instead, it just kept the message blue, though there was no delivery reciept.
I called my wife up to confirm that she had no wifi, and when she sent me an sms as a test, my send bubble turned green.
When my wife came home 4 HOURS LATER, and her iPhone connected to our home wifi, all the iMessages I sent her (about 5 of them) arrived simultaneously.
I have found iMessage to be VERY UNRELIABLE in its ability to figure out if the recipient is online or not. So now I just send the blue iMessage, have it send, and then tap on the iMessage to have it "resend as sms" just in case.
(FYI, I'm in the Philippines, where cellular data is charged by time increments, 15 or 30 minutes, not data usage. So keeping cellular data on is not an option, unless I subscribe to an unlimited data plan)