You should ask your manager. First identify what you'd work on, then make an argument for how improving it would be good for the company as well as the public, and finally (if needed) try to sell them on the PR and recruiting benefit to the company. Propose a specific chunk of time for it, so your manager doesn't have to worry about you disappearing down a rabbit hole. (I might suggest the last 4 hours of the week, when not much gets done anyway.)
If you work for a larger company there may be policies around this, and they are likely to make it more difficult. But as a developer, you only need your manager's approval.
If you work for a smaller company you'll have a much easier time selling the idea. And if it's really important to you, consider working for a company that actively supports this.