Although you don't need to use age grouping in your race, it is recommended. Using age groups can help athletes compare their performance against their peers and themselves across races.
For your 5K age groups, you can use 10-year groups (e.g. 20-29, 30-39 etc), although the USATF standard of 5-year groups (e.g. 20-24, 25-29) is more common for most races larger than 100 participants.