For cardinal numbers, generally the Chinese reading is used, however the Chinese reading for 4 and 7 sounded too much like the word for "death" ("shi") and were considered ill-omened, and thus the traditional Japanese words for those numbers were used in preference.
Actually, all numbers have two words for them, one based on the Chinese reading and the other based on the traditional Japanese word. But for the rest of the numbers, the traditional Japanese one doesn't get much use as a standalone word, and only gets used within compound words (for example, 2 is "fu" or "futa", which you'll see in "futatsu", "futari", "futafukuro" and others).
Generally speaking, when one is reading out individual numbers or using various counter suffixes, one uses "yon" and "nana". However, when counting (1-10, 1-20 whatever), ones usually uses "shi" and "shichi", and also certain specific words always use them. For example, April and July are always "shigatsu" and "shichigatsu", seven people is usually "shichinin" (although four people in yonin), the 17th and 27th days of the month are always "juushichinichi" and "nijuushichinichi", and there are multiple other examples, too.
If you want to get it right, you kind of just have to learn all of the individual examples, as there isn't really any rule to it. You'll still be understood if you use the wrong one, though, so you needn't worry too much about it.