Should freelancers find a market and then try to come up with an idea for it, or develop the idea first and then find a market?
I do both (with mixed results), and I think most freelancers would say the same.
Sometimes I'll learn about a new market and try to think of ideas to pitch. I'll browse through the website and see what kinds of articles they use, hoping it'll give me some inspiration. I was browsing through one publication that deals with Renaissance faires. They had an index of stories (LOVE those! We need more indexes, please!), and I saw that they ran stories about Childbirth, and another about Marriage...what seemed like the next logical step? Why, death, of course! Brilliant! Sure enough, I sent in a query and the editor wants a story.
Or I'll get this idea and try to adjust it to suit a market. Again, I'll browse through the site to see if they've done something similar, then I'll work on the query and hope for the best. I tend to think big and often have to scale my ideas waaay down--again, I have mixed results. I often make lists of ideas and possible markets for them--it helps me stay organized, and then I don't have to obsess about getting the query done before I forget my brilliant idea!