If inside 'elif' ignored / not working with autosmooth script
The problem here is not that the if statement in the elif was ignored, but rather the statement itself didn't evaluate to True. To help debug your control flow consider adding a temporary else statement with a print(). Even if you then still don't understand why an if statement isn't True you'll have localized the problem, and you can try to solve the real issue: comparing floats.

As a test you can even run this directly from the TextEditor, and check the terminal / console for the print statements.

some_value = 0.343523435235
if some_value == 0.34352:
    # do something
    print('yep')
else:
    print('some_value ({0}) is not equals to 0.34352'.format(some_value)) 


Use some aliasing and the rounding as suggested by jerryno. Another readability improvement is the inclusion of radians(180) and radians(30). These carry extra meaning to the reader (mostly you) than a rough float does.

import math   #  &lt;--- yes!
from math import radians

class SetAutoSmooth(bpy.types.Operator):
    bl_idname = "set.autosmooth"
    bl_label = "Set Auto Smooth"
    bl_options = {'REGISTER'}

    # have a poll check for active_object (optional)

    def execute(self, context):

        data = bpy.context.object.data
        data.use_auto_smooth ^= True  # inverts

        # use the boolean directly, else it's like saying: if True == True
        if data.use_auto_smooth:
            if round(data.auto_smooth_angle, 5) == round(radians(180), 5):
                data.auto_smooth_angle = radians(30)
            bpy.ops.object.shade_smooth()

        return{'FINISHED'}


seen as the extra bit is only intended to be done if the use_auto_smooth is True after the inversion, then that will still need an if-statement. If you see so much repetition of code characters you need to think about using aliases (a variable to store a reference lookup) . It's easier to read and easier to write.



some Python notes  

math.isclose()

Python 3.5 will be getting / has a new feature for testing if a float is close to another float, so we won't necessarily need to use rounding anymore. This feature is called 'approximate equality': read about it here https://www.python.org/dev/peps/pep-0485/

math.isclose(a, b, relative_tolerance, absolute_tolerance)

inverting a boolean

These two lines are functionally equivalent

data.use_auto_smooth = not data.use_auto_smooth
data.use_auto_smooth ^= True


The ^= is an augmented arithmetic assignment