The best way to think of an idea for a startup is to come up with a solution to a problem that you encounter while doing (or trying to do) something that you're passionate about. For instance, maybe you love traveling but would like a more affordable, local and unique feel to your stay: AirBnB.
Doing it this way helps ensure that:
1) You'll be passionate about your idea, since it relates to your interest. This will help you stick with your startup over time and through difficulties.
2) You'll have a deep knowledge of the field to which the idea is being applied. This means that
A) you will know how to best pivot the idea during development if necessary (always is), and
B) it's less likely that someone else has already thought of your idea and is doing it better.
Keep in mind though that coming up with a good idea, and coming up with an idea that would be good for a startup are two different things. If you don't have a business background, always talk to one or two people that do, in order to hash out whether the idea has scalability and other features that are necessary to make it profitable.