What is the colored bar on the top of some of my email messages?
The colored bars are an additional feature of the Exchange Online Protection. There are 4 colors with 4 meanings that you could possibly see. Each bar represents a different level of alert based on information in the email message or based on information about the sender.
For more information you can read the blog post by Microsoft about email safety.
Common Alerts
Red Bar

The red bar is displayed when something in the message doesn't look right. The message may change and may alert you about the sender rather than the message itself but in all cases, you should look carefully at the message before taking any requested actions. An example of a full email looks like this

Yellow Bar

The yellow bar is a warning to you that the message was flagged as spam but might not actually be spam. It provides a link for you to give feedback as to whether the message is spam or not.
Less Common Alerts
Green Bar

The green bar will show you that the sender is a trusted sender. This bar will be seen infrequently but may appear from time to time.
Gray Bar

The grey bar will appear if IT has explicitly allowed certain messages through to bypass the spam filters and protections all together. It will not be common to see this bar in your email messages.