"Which grain?" Wheat? Rye? Oats? Corn? Spelt? Milo?
From context, I think that you mean, "Which bullet weight." Is that correct?
I am not an expert on the .40 round, and I have no experience shooting it, but I believe in using the heaviest practical bullet that's available in any cartridge size. Someone with more experience with .40 could provide a better answer, once we're sure of exactly what question you're asking.
"Grain" is a measure of weight (as well as being a cereal crop). Both bullets and powder charges are measured in grains. Bullets are also measured in diameter, expressed either in millimeters (10mm) or in hundredths of an inch (.40).
(Although gunpowder is granulated, each "grain" of a granulated powder does not weigh one grain of weight. Think of the physical differences between a "grain" of wheat and a "grain"—a kernel—of corn.)