It depends on which period of Japanese warfare you're talking about. As you'd imagine, history is not some homogeneous single unchanging period, especially not in Japan, and so over time cultural values and military doctrine change, and so do the roles of mounted archers. I'd point you to answers that I've given elsewhere here, here, here, and here - they go into depth the changes in Japanese warfare style and so give a good grounding for how and why the role of horse archers has changed throughout history. To summarise it, prior to the formal establishment of the shogunate (as in, when the concept of a shogun was introduced mainly as the 'leading general'), Japanese armies were still quite small in number - they probably don't even count as armies, as each 'unit' was composed of less than 100 men. During this time, they fought almost exclusively on horseback, and often paired off against each other in combat. However, with the establishment of a shogunate, the decentralisation of the government, a shift in power from imperial court to shogunate, and historical events such as the Mongol invasions and the Genpei war (none of these can be conclusively pointed to as the catalyst for change - they all built upon each other), as well as more cultural influence from China, lead to the changing idea that, essentially more is better. Army sizes start to increase, and you would see more and more footsoldiers (called ashigaru during the Sengoku period, which is what you're likely thinking of in the original premise of your question) composing these armies. Eventually, it culminates in the Sengoku era, which is what we're all familiar with.
Moving on to the role of the horse archer now that we understand what's happening in Japan - essentially, prior to the official establishment of the Kamakura shogunate (and some years before), the role of the horse archer wasn't really 'defined', because for the most part horse archers were the only 'unit type' (for lack of better word) that made up the army. However, later, when more 'unit types' were being seen, and this paralleled by an increase in the popularity of spears and polearms, you would see a number of mounted spearmen as well, and archers would not be played to as significant of a role (though it still existed).