It can be very challenging to choose your research topic. It is really important to choose it wisely, as it will determine what you will be working on for at least 2-3 years and possibly for life! I will try to summarize some of the key points in this post:
1- You should be really passionate about the topic. Getting a PhD can be a tough experience for various reasons. There will be times that you will feel disappointed, helpless and stuck! You need a very strong drive to overcome the difficulties, stay motivated and keep going! This strong reason to keep going can be your passion about a specific problem.
2- It should be a shared interest between you and your adviser. Also, your adviser should know enough about the topic to be able to help you. Sometimes your PhD adviser might not be interested in a particular area or not know much about it. This can make your life much harder as might not get support from your adviser.
3- You should be clear about your interests, strengths, weaknesses and also should be aware of the job market. There are some interesting topics that might not have good job market and despite your success in research, you might not get your dream job!
4- If there is a funded project in your research lab, if you can find a topic related to that, it would be perfect! Otherwise, you might end up doing TA or working elsewhere for financial support, which is not fun!
5- Read a lot of papers in your area of interest! This will give you a good idea about what other people have done and what are some of the unsolved problems that you can work on.
6- Get feedback from senior students, your adviser, people you meet in conferences. People who are more experienced, have a better understanding of the field and can help you a lot.
7- Consider your access to the tools that you need for doing the type of research you are interested. For example, if you are considering doing research in deep learning and you do not have access to GPUs, then do not bother! You will not be able to compete with people who have access to multiple powerful severs and your failure will not necessarily mean you are not doing good research, but that you really do not have what you need!