Alimento e comida have the same meaning, and they can be used interchangeably in Brazilian Portuguese.
However (my opinion), I notice in my everyday that "alimento" is more used to refer to every substance that you eat in order to keep your body working, while "comida" is the particular way that the food is prepared.
For example: apple, sugar, flour, butter, eggs are types of "alimento", but a pie is "comida".
The word "comida" may be a cultural reference, as well: "comida brasileira", "comida russa", "comida árabe". All those terms refer to a particular way that the food is prepared.
I hope it helps!