To answer the part of your question...
The lilly pilly is currently flowering. Is it a good time to trim it?
No, do not prune while it is flowering.
As a general “rule of thumb” for pruning shrubs and trees, prune after flowering and before too much new growth has progressed.
There are obviously exceptions to this rule.
This does apply to your lillypilly, so wait until it is finished flowering before you prune.
The reason... plants place a lot of energy into growing their flowers. If that process is interupted or cut short (bad pun), the plant has “wasted” that energy and in my experience, that can be enough to set a plant back for one or two seasons.
To answer the part of your question...
How regularly I should trim it?
This is based upon a number of factors...
- How quickly does the plant grow (which in itself is based upon a number of factors, such as how often you water and fertilise, your garden location and climate in comparison to the lillypilly’s natural habitat and range);
- How “neat” you want the plant to look (i.e. a more natural round shrub shape or a more square shape closer to topiary);
- How dense you want the plant to look (closed in habit with small leaves and branches growing very closely together or more open habit with larger leaves and branches more spread out).
Generally it is best to schedule one or two trims during the growing season (spring and summer).
A more open habit will require less pruning - once or twice during the growing season.
A more dense habit will require more pruning - five to six times during the growing season.
As a side note, when cutting back an overgrown shrub or tree, I always try to leave some tall growing tips, even if the plant looks a little unsightly, until the trimmed part of the plant begins to grow again. This helps to reduce the stress on the plant.