I would have read this English YA novel in the late 2010s, though I'm not sure how old it was at that point. It was picked up from a local library in the Western United States. I am 50% sure there was at least one sequel. It's also likely that either it or its sequel had a glowing tree on the cover. Both titles were short.
The setting
This is what I most vividly remember.
I have no idea when, chronologically within the book, I would have picked up this setting information. From what I recall, it was sprinkled around throughout, with certain pieces being used as reveals. Some of this may be from the sequel. I recall so little plot from the sequel, though, that it can safely be assumed the majority is from the book in question.
Earth sent off a colony/science ship to explore a planet considered habitable. When they landed, these carefully-selected folks started science-ing around. Then the first town-wide (possibly planet-wide, but the book doesn't stray too far from town) amnesia event hit and they (or at least a decent number of them) forgot what they were doing. Alone on an alien planet, this group sets up a society that can withstand everyone in it forgetting themselves on a regular basis.
So, the amnesia. It hits every X years, at a predictable time. All conscious memory is lost: your name, your relationships, where you live, stuff you memorized for a job, etc.. I'm pretty sure that unconscious "muscle memory" or the like remains.
Every person in town is required/strongly encouraged to keep a diary of everything they do. Once a diary fills up, it is checked in to the library and a new one taken out. On the day when the amnesia hits, everyone holds on to their latest diary and goes to their home. That way, when they come to they'll know who their family is and where they live. They can then figure out who they are by reading the diary they kept with them. The rest of their life can be pieced together from the diaries saved in the library.
The public is assured that the diaries are sacrosanct, and that by having their diaries saved in the library they will live on forever in memory.
The day(s) before the amnesia hits, people do things they wouldn't do normally (like the Purge). Teens go out and do stupid stuff together, people run away with lovers - because if it isn't written in their diaries, then no one will know the next day. I think I also recall something about a man writing himself out of his family's life because he wanted to take up with another woman.
Other life events get planned around the amnesia as well. There's a note about how it's bad to start an apprenticeship too close to getting amnesia, because there won't be enough time for what you learn to move into unconscious memory. Thus you'd have to start all over again. Age is at least partially tracked by the number of amnesia events you've had.
There is a certain (flower?) plant thing that was connected to the amnesia - either it was the cause or a cure. I'm leaning towards "cure", but am not sure.
The local wildlife is called by names reminiscent of Earth life. The specific example I can think of is a small bug which had a name similar to "grasshopper".
The plot
And now we get into territory that I'm less sure about. I also remember only the barest sketches of plot.
The main character (hereafter called MC) is I think female, and has an older sister/mother (or other family member, hereafter called FM) who disappears at some point. During one amnesia event, MC manages to remember some stuff. Which is deeply weird, since that's supposedly impossible.
MC starts investigating the matter. One thing she does is go to the library and try to read her FM's diaries. There are some complications (maybe she's blocked from doing this?) and she goes to the library several times. Her actions alert a high-up government person (hereafter GP) who I think is also female. (I only started doubting the genders here when I realized how many important female characters I remember).
GP did something nefarious to FM's diaries. Maybe some pages were removed, or the diary was read without permission. Regardless, these activities present some sort of problem to MC's investigation.
Things escalate. No, I do not remember how or why they escalate. Sorry. MC's research into a cure/preventative progresses, and this is for some reason seen as dangerous by GP. MC goes out of town exploring and finds the Helpful Bunker of Exposition (that's what I called it in my head), which exposits the world's backstory and has some information about Earth. MC realizes something about GP from the Helpful Bunker and hurries back to town.
Later, a lot of townsfolk are hiding in a basement. (Maybe MC rushed them there?) They have some supplies, from... the Helpful Bunker? Secret stocks below the library? Anyways, they're worrying about not having enough supplies to outlast... something. I think the "something" was airborne and going to invade the aboveground areas. Maybe the "something" was GP artificially causing an amnesia event?
There's an encounter between GP and MC. I distinctly remember an injection needle being involved somehow. The whole thing ends happily. I think they can now control/prevent the amnesia events.
I'd really love to find this book again. The setting was marvelous, and I am interested in what actually happened, plot-wise, within the world that I remember so acutely. So: what book is this?