Добрый is an adjective and follows the rules of the gender of the noun that follows it. Утро is neuter, but день and вечер are masculine.
Good morning. Доброе утро.
Good afternoon. Добрый день.
Good evening. Добрый вечер.
Hope this answers your question a bit.