They just flash blue if you have a notification from any app including text messages or a missed call.
The steady green is when the battery is fully charged while plugged in. If there is a notification, the light will flash blue. Once the notification is cleared, the light will turn green again.
Red is for when the battery is charging. Same applies as above if there is a notification.
There may or may not be apps in the playstore that can control what colors a certain app will show. I used to be able to do this on an old Nexus phone but I haven't tried it since moving from that phone so I have no idea if any of those apps work on the current Android OS.