Function to add class to element?

That plugin does not create a <form> tag itself. It uses wp_login_form to do that, and that function does not provide a way to add a class to the <form> tag. You can see that by looking at the widget method, which is what generates the front end content.

I don’t see a way to do what you want to do, but there is an action before the form– do_action( 'sidebar_login_widget_start' );— and one after– do_action( 'sidebar_login_widget_end' );— that would let you wrap the whole form in some other markup.

However, I very much doubt that you need to add a class to that tag. I would bet that you can do anything you need by writing CSS rules using the existing markup.