What causes an iMessage to be delivered as a text message?
When the receiving end did not set up iMessage on the iPhone, or when there is no internet connection available (for both receiver and sender), it will fall back to plain SMS messages.
You can disable this option in Settings > Messages > Send As SMS
.