Short answer is to look at their skills and see where additional damage will come from ( if there can be any ) to find out what's most benefitial to get.
Blue numbers mean that addition damage will come from AP
Red comes from AD.
If your character has some "# of attacks" based ability (like yi, xin, or TF) then it's a good idea to focus a bit more on AS
And in general, APen wins out over pure damage, and MPen wins out over AP but you only need runes, and maybe one item with armor penetration since the APen items are better..