You want to build software that people will use, and that will make you money.
One trick is to listen to the things people say (and think) when they're struggling. I call these the "inner thoughts of customers". Listening and identifying pain are the keys to finding great product ideas.
These are examples of inner thoughts people have before going out to find software to solve their problem. Expressions like this are opportunities for creating a marketable solution. Note: Most of these have a B2B market in mind.
"I wish I could hire someone to do this for me."
"I wish I understood this."
"Why is using this so frustrating?"
"Why can't I make this do what I want?"
"I want to impress my boss."
"I wish there was an easier way to do this."
"I hate doing this every month."
"I never remember how to do this."
"Why is this process so complicated?"
"I don't trust myself to do this properly."
"I want this project to make me feel good about my career."
"I don't know how other people manage this so well; I can never make sense of it."
"I feel stuck; I can't move forward until I figure this out."
"I wish I was better at this."
"I don't have time for this."
"I don't want to manage this."
"Why are there so many steps?"
"Why is this so slow?"
"How do I make this automatic?"
"Working on this is stressful."
"I always forget that step and mess everything up!"
"I have to set this up every time."
"I know this is important, but I never have time to deal with it."
"Every time I use this I get lost."
"I want to manage my time better."
"This is boring."
"This makes my work look like crap."
"I want to feel creative."
"This process feels clunky."
Be attentive! Customers will let out these "inner thoughts" almost accidentally. It might be on a support call, in an email, in a forum, on Twitter, or during a customer development interview. You're looking for those things people utter under their breath while using software or trying to accomplish something.
You dig deeper: find out what is causing them to say these things. For example, every time Patrick Collison tried to accept payments online he felt overwhelmed, and that the process was too complicated. This led him to build Stripe.
Keep asking the customer to "tell you more". Write down the notable things you hear. Talk to more people, and see if they complain about the same things. Draw out the strongest pain, and build your app's prototype based on that.
It takes practice, but once you learn to identify these undercurrents, you'll be on your way to creating products that people love.