The closest answer to this would be: it depends. There aren't two communities online that are identical, not even the ones covering the same topics. I've been building Nichiate niche communities for clients for quite a while now and, even though the building principles are more or less the same for every community that I've built, the 'appealing' part varied.
There are three pillars what work in almost all of the that make one community appealing:
Topic: People within the communities gather around similar interests. Community about preserving environment will probably have more potential members than the postage stamp collectors community. The wider the topic and the more members it attracts, the more appealing the community will be to all of its current members, as well as the future ones. The hack here is that you can always either widen the scope of the original topic and make it appealing even to the people who do not originally belong to 'the interested parties'
People inside: The previous point brings me to this one. People will be joining and appreciating your community based on the people you already have inside. We usually go where are friends are. People are also more likely to join and engage when a community is featuring a renowned expert from a given field. Finally, people will join if they see the numbers as the 'Fear of missing out' will kick in.
Content: If you are researching building communities, you've probably read somewhere how 'content is the king'. Content drives most of the engagement inside of the community. Whether it is important updates, opportunities, memes, coupons, or anything else you can think of in terms of content, this is what makes your members retype the name of your community into their URL bars every time. Based on which type of community you're building, you will have the choice which type of content works for your community best, if not all of them.