There is no rule to win a hackathon. However, some tips may help you find the best idea!
Develop a product you would use
The simplest way to validate your idea is to develop a solution to a problem you or your friends have! When you keep this in mind, you already have the correct perspective of the persona to validate your idea.
Know your market
Invest time to understand what your target audience needs. When you deliver what the market wants, it is much easier to retain your customer;
Validate your idea
The ecosystem of a hackathon is great for validating ideas! In addition to your team, you will have contact with mentors, juries, and other participants with skills very different from yours and with complementary worldviews. Try to ask for feedback, show your idea e talk to everyone!
Take a chance
Do not be afraid to develop any idea, however crazy it may be! Start by developing a simple prototype and evolve your idea little by little, as it validates each functionality.