The reason this happened is most likely because you had the “Send as SMS” setting in Messages turned on, and your 3G/4G/WiFi connnection was weak.
(It has nothing to do with the recipient’s data connection, other than where they have turned iMessage off completely. If they have a weak connection, the iMessage will just sit waiting undelivered until their connection is strong enough to receive it.)
My advice is to turn off “Send as SMS” in Settings>Messages.
It serves no purpose other than to send an SMS/MMS which you will never know whether it has or ever will be delivered; and if you’re sending photos/other multimedia, texting a foreign number, etc, you might incur unwanted charges.
If you really want to, you can always force/long-press an undelivered iMessage and manually send it individually as a text message. But it’s usually better to wait until the recipient connects to 3G/4G/WiFi, then at least you’ll see a delivery receipt.