To summarize this book: Rabbi Moshe Sofer considers it an unacceptable attempt to emulate the gentiles. (Responsa Bet Shearim, YD No. 402).
In a similar vein, R. David Tzvi Hoffman cites Rabbi Samson Raphael Hirsch (in Shut Malmad Lehoil Part II YD Number 109) opined that putting flowers on a grave is forbidden as imitation of non-Jewish practices.
Rabbi Yitzchak Weiss (d. 1988) in (Responsa Minchas Yitzchak vol. 1 No. 31) reviews the views on the topic, citing an opinion that imitating non-Jewish practices is only prohibited when there is no reason for them other than consciously imitating non-Jews. Accordingly, one might permit the practice as showing respect to others is certainly meaningful, (and not just an attempt to imitate Gentiles). Nevertheless, he concludes that the practice is forbidden as the dead lack awareness of the flowers, so there is no good reason to honor them.
Some of these arguments can be debated, such as the meaningfulness of a gesture performed unbeknownst to its recipient. See there for further discussion.
It should be noted that according the above, the real reason why Jews don't put flowers on graves, is because Jews don't put flowers on graves. This creates a problem for as the OP noted, "I also don't know why non-Jews do put flowers on graves".