Blue represent iMessages / messages that can only be sent and received via members with compatible Apple devices. It also represents contacts who have iMessage enabled on their devices.
Green represents SMS/MMS message and well as contacts who do not have an Apple device or who have iMessage disabled.