Taste is mostly about having a good intuition on the topics where your intuition is worth following. It tends to develop with experience. But if you want to develop the kind of taste that helps picking good research topics, you need the right kind of experience for that field of research. Experience that turns out to be of the right kind, in retrospect. If your experiences and interests align (again in retrospect), you will probably develop a good taste for research problems in your field of interest. But that requires some amount of luck, in addition to everything else.