Which hooks should I implement in Drupal 7 that are the equivalent of hook_comment() and hook_nodeapi()?
I will reply to your question basing on the value for $op shown in your code snippet.
hook_nodeapi(), &quot;insert&quot;
The equivalent for Drupal 7 is hook_node_insert(), which receives just one parameter: $node.
hook_nodeapi(), &quot;validate&quot;
The equivalent for Drupal 7 is hook_node_validate(), which receives three parameters: $node, $form, &amp;$form_state.
The implementations of hook_node_validate() don't usually use the last parameter, but they check the values of the properties for the $node object.
hook_comment(), &quot;insert&quot;
The equivalent of that hook, in Drupal 7, is hook_comment_insert(), which receives the comment object as unique parameter.
hook_comment(), &quot;validate&quot;
Unfortunately, in Drupal 7 there isn't hook_comment_validate(); you need to add a validation handler for the comment form.
function mymodule_form_comment_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['#validate'][] = 'mymodule_comment_validate';
}

function mymodule_comment_validate($form, &amp;$form_state) {
  /**
   * Validate the comment.
   * $form_state['values']['name'] is the name of the user who wrote the comment;
   * $form_state['values']['is_anonymous'] is TRUE if the user is anonymous (not logged in);
   * $form_state['values']['mail'] is the email address of who wrote the comment;
   * $form_state['values']['homepage'] is the URL of the website of who wrote the comment;
   * $form_state['values']['subject'] is the title of the comment;
   * $form_state['values']['comment'] is the text of the comment;
   * $form_state['values']['language'] is the language associated with the comment;
   * $form_state['values']['uid'] is the user ID of who wrote the comment.
   * $form_state['comment'] is the comment object.
   */
}

Notice that mymodule_comment_validate() doesn't get any $comment parameter, and $form_state['comment'] is an object, not an array. You are using a $comment variable that is not defined, nor is one of the parameters.
The code I wrote works independently from the content type of the node where the comment appears. In Drupal 7, the hooks called to alter a form build from another module are hook_form_alter(), hook_form_BASE_FORM_ID_alter(), hook_form_FORM_ID_alter(). The base form ID for the comment form is &quot;comment_form.&quot;
If you just need to alter the comment form for a specific content type (e.g. the &quot;Article&quot; content type), then you replace mymodule_form_comment_form_alter() with mymodule_form_comment_node_article_form_alter().