I know flags are usually to bring bad things to a moderator attention, but can they be used to bring a good thing to a moderator's attention? For example, I came across a very helpful question: What "hacking" competitions/challenges exist? and it was closed for being too broad. However, the information it contains is very helpful, so I flagged it, with a request to re-open it. Was this the proper use of a flag here, and should I do this in the future if I come across something like that?
Flags should be used whenever you feel that a moderator should look into something, just realize that they create work for someone. Asking a mod to review a closing is fine, if you feel that the question was closed inappropriately, but consider doing the following instead if you really think it belongs:
- Edit the question to address any concerns folks raised in comments, or the reasons given in the close reason
- Raise a discussion on the per-site meta to see if others feel that the question can now be reopened. If folks think that it can, then it will be.
Alerting the mods that something was closed without taking any other action is very likely going to result in a mod looking, and not taking action. If the concerns raised in comments or the close reason can't be addressed, then it's probably not a good fit for the site, and probably not the best use of time to have someone review it.
Put simply, flags to reopen something tend to carry quite a bit more weight if you've also put some work into the post yourself - just take care to spend your time wisely. If a really broad question managed to get an answer that you think is really useful, then make the question less broad, pair it more with the answer by narrowing it to the answer, and then we've got something of lasting value.
But yeah, flags are okay when you really feel "something isn't right here and someone needs to know about it" - just make sure there's something actionable there, at least to the best of your ability.
"Good things" is a very broad term and doesn't really apply at all to what flags are for. Flags are for bringing important things to the attention of moderators. Most of the time that ends up being "bad things" but not always.
As for your specific example, your flag will probably get declined. Simply saying "this was helpful it should be reopened" is not a good flag. That question was closed for good reason, because it's not a good question for the site. It's usefulness is not at all relevant to its topicness on the site. Usefulness is determined by upvotes and downvotes, not the state of being open or closed.
Moderator flags (that is, the ones where you type a custom message, like you did here) should be used for cases where a moderator should act. Asking that a question be reopened, or closed, doesn't fall into that category unless it is stunningly obvious that there's a problem. (That's more likely for "close" than "reopen".) The reason close and reopen don't generally fall into this category is that these are things that should be done by the community.
If you cast a reopen vote, or if a question is edited after being put on hold, it goes into the reopen queue to be considered by other users. That's the right outcome. Similarly, if you cast a close vote it goes into the review queue for closing questions. If you don't think a question is getting enough attention, you can also bring it up on your site's meta.
Here are some "good" cases where a moderator flag would be appropriate:
To point out that a bunch of comments on a post are obsolete, rude, or not constructive. (If there are a bunch it's better to flag the post than to flag each individual comment.)
To point out an edit that changed the post in a way you think the author wouldn't approve of.
To point out an edit/rollback war.
To request that a deleted post be undeleted, if it was deleted by a moderator and then edited to address whatever problems got it deleted in the first place.
Given that particular situation, you might be better off making a meta.security post. Posting in meta can draw additional attention to the question and kick off a discussion of whether or not it should be closed. A flag may only get the attention of a single moderator, which is much less useful.
It's also worth noting that closing a question doesn't necessarily mean that a question will be deleted. The deletion vote is separate from the closure vote unless the question has a non-positive score and no answers. Closure itself just means that no new answers can be posted. Maybe the thing to do is to post a comment arguing for its retention, since those will be visible in the Delete queue.
You can read more in How does deleting work?
Note: I'm not arguing that you can't flag for "good" -- just that you might not want to do so in this particular case.