Closing
Yes, it would make sense to vote to close if the question is currently off-topic. That's the whole point of the feature-- leave an indicator that said question shouldn't accept new answers at the current time.
In my opinion, closing a question for not containing embedded code is most important. If such a question is posted, someone answers, the link dies, the whole question is now obsolete. But, if it appears that the OP is still around, he/she can be notified to possibly fix the links. If that's not possible, then it can be deleted. It also doesn't matter if there are already upvoted and/or accepted answers-- they should not have been posted in the first place.
Deleting
Deleting is different. If the OP has written a bad question receiving downvotes that can still be improved, then he/she could delete it, improve it, then undelete it. As for other users casting delete votes, I think that should mainly be done if the question is just crap. The best example of this is spam. Beyond that, you may flag for deletion if you're very sure that the post should be deleted. Unfortunately, we don't currently have enough 2K+ users casting delete votes on questions and 4K+ for questions and answers.
This is also mentioned on the moderator tools privilege page:
When should I delete questions?
Closed questions that are of no lasting value whatsoever should be
flagged and deleted.
Before voting to delete, please check that there are no good answers;
if so, then the question should be flagged for moderator attention as
a potential merge candidate. We don't like to lose great answers!
Also, be cautious when deleting questions closed as duplicates; they
can serve as a signpost, directing users to useful answers on another
question.
And on the trusted user page:
When should I vote to delete an answer?
You may vote to delete answers in the following cases:
- The answer is extremely low quality: There is little to no scope for
improvement.
- The answer doesn't answer the question; it may be a comment or a separate question altogether.
- The answer is not much more than a link to another page. Link only answers are not allowed on
Stack Exchange.
Locking
This can only be done by diamond moderators. As such, there is no voting mechanism in place for it. If you're absolutely sure a post should be locked instead of closed or deleted, flag for a moderator. For more information, consult the MSO FAQ post. Quoted from that post:
When should a post be locked?
Posts should generally only be locked in cases where something
seriously bad is happening. In particular, where the ongoing updates
and edits are actively detrimental to the system.
Some examples of when a post might be locked include:
- A question or answer where repeated voting or editing is happening in
a way which attempts to game, hack, or otherwise abuse the system.
- A question that gets opened and closed repeatedly many times without
achieving community consensus on whether it should stay open or
closed.
- A question that, for whatever reason, continues to attract
flame posts, spam, or other inappropriate answers.
- A question that is repeatedly vandalized by its asker; for example, to drastically alter the meaning of the question that invalidates existing answers, or to obliterate/obscure the question.
and then the OP never answers
- how much time is never? \$\endgroup\$