Yes it's okay to freeze coffee beans and freezing coffee beans will help keep them fresher longer.
So if you have coffee beans that you don't want to grind right away and use then store the coffee beans in a freezer safe airtight container.
The coffee beans will be okay for a long time but it's best to use the frozen coffee beans within 6 months for the best freshness and best taste of the coffee.
Some good way to store frozen coffee beans in the freezer is with double Ziploc bags, vacuum sealed bags, sealed one-way valve bags and airtight coffee containers.
But you can store the coffee beans in a sealed plastic container that you store other food in but the more airtight the container is the better.
You can also just refrigerate the coffee beans and they will last awhile too.